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

:root {
  --ink: #0E1116;
  --ink2: #141922;
  --amber: #D98E48;
  --paper: #EDE7DC;
  --dim: #A9A29A;
  --line: rgba(237, 231, 220, 0.14);
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Noto Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background: var(--ink);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem clamp(0.9rem, 4vw, 2rem);
  background: rgba(14, 17, 22, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  flex: none;
}
.markimg { width: 32px; height: 32px; object-fit: cover; }
.marktxt { font-size: 16px; letter-spacing: 0.1em; padding: 0 0.55rem; }

.menu {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.menu::-webkit-scrollbar { display: none; }
.menu ul {
  display: flex;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.55rem;
  font-size: 16px;
  color: var(--dim);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}
.menu a:hover { color: var(--paper); border-bottom-color: var(--amber); }

.grp { position: relative; flex: none; }
.grp summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.7rem;
  font-size: 16px;
  color: var(--dim);
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
}
.grp summary::-webkit-details-marker { display: none; }
.grp summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--amber);
  border-bottom: 1px solid var(--amber);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s ease;
}
.grp[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.grp nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 70;
  min-width: 200px;
  padding: 0.4rem;
  background: var(--ink2);
  border: 1px solid var(--line);
}
.grp ul { margin: 0; padding: 0; list-style: none; }
.grp a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  font-size: 16px;
  color: var(--dim);
}
.grp a:hover { color: var(--ink); background: var(--amber); }

.cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  font-size: 16px;
  color: var(--amber);
  border: 1px solid var(--amber);
  white-space: nowrap;
  flex: none;
}
.cta:hover { background: var(--amber); color: var(--ink); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15vh clamp(1rem, 6vw, 4rem) 9vh;
  border-bottom: 1px solid var(--line);
}

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  perspective: 1px;
  pointer-events: none;
}
.lay { position: absolute; display: block; will-change: transform; }
.lay.a {
  top: -8vh;
  right: -10vw;
  width: 56vw;
  height: 56vw;
  background: radial-gradient(circle at 50% 50%, rgba(217, 142, 72, 0.34), rgba(217, 142, 72, 0) 63%);
  filter: blur(8px);
}
.lay.b {
  top: 20vh;
  left: -8vw;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle at 50% 50%, rgba(237, 231, 220, 0.1), rgba(237, 231, 220, 0) 66%);
}
.lay.c {
  inset: auto 0 0 0;
  height: 40vh;
  background: linear-gradient(to top, var(--ink), rgba(14, 17, 22, 0));
}
.grid {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0.75;
  background-image: radial-gradient(rgba(237, 231, 220, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 62% 28%, #000 8%, transparent 70%);
  mask-image: radial-gradient(ellipse at 62% 28%, #000 8%, transparent 70%);
}

.hero-txt {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 48ch;
  text-align: right;
}
.kicker {
  margin: 0 0 0.6rem;
  font-size: 16px;
  letter-spacing: 0.3em;
  color: var(--amber);
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 6.2vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.lead { margin: 0 0 1.4rem; font-size: 16px; line-height: 1.85; color: var(--dim); }
.hint { margin: 0; font-size: 16px; letter-spacing: 0.26em; opacity: 0.55; }

.collage {
  position: absolute;
  top: 14vh;
  left: clamp(1rem, 6vw, 4rem);
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(32vw, 300px);
}
.collage img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: grayscale(0.25) contrast(1.05);
  will-change: transform;
}
.collage img:nth-child(2) {
  width: 76%;
  margin-left: 2.4rem;
  aspect-ratio: 1 / 1;
}

/* ---------- 主体骨架 ---------- */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: clamp(1.6rem, 4vw, 3.6rem);
  align-items: start;
}

.chapter { min-width: 0; }

.prose { max-width: 70ch; padding: 7vh 0 12vh; }
.prose > div {
  padding: 5vh 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}
.prose > div:first-child { border-top: 0; padding-top: 0; }

.prose h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.4rem, 3.1vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.prose h2 + hr {
  height: 1px;
  border: 0;
  margin: 0 0 1.4rem;
  background: linear-gradient(90deg, var(--amber), rgba(217, 142, 72, 0));
  opacity: 0.75;
}
.prose h3 { margin: 2rem 0 0.6rem; font-size: 1.15rem; line-height: 1.4; }
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin: 0.35rem 0; }
.prose a { color: var(--amber); border-bottom: 1px solid rgba(217, 142, 72, 0.5); }
.prose a:hover { border-bottom-color: var(--amber); }
.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.3rem 0 0.3rem 1.1rem;
  border-left: 2px solid var(--amber);
  color: var(--dim);
}
.prose img { margin: 1.4rem 0; border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; }
.prose figure { margin: 1.4rem 0; }
.prose figcaption { font-size: 16px; color: var(--dim); }

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 80px;
  padding: 3rem 0 3rem 1.2rem;
  border-left: 1px solid var(--line);
}
.rail h2 {
  margin: 0 0 0.55rem;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--amber);
}
.rail hr { border: 0; border-top: 1px solid var(--line); margin: 0 0 0.7rem; }
.rail ul { margin: 0; padding: 0; list-style: none; }
.rail a {
  display: block;
  padding: 0.5rem 0;
  font-size: 16px;
  color: var(--dim);
  border-bottom: 1px dashed rgba(237, 231, 220, 0.08);
}
.rail a:hover { color: var(--paper); }

/* ---------- 滚动揭示 ---------- */
html.js .prose > div {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.js .prose > div.in { opacity: 1; transform: none; }
html.js .prose > div > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.6s ease;
}
html.js .prose > div.in > * { opacity: 1; transform: none; }
html.js .prose > div.in > *:nth-child(1) { transition-delay: 0.04s; }
html.js .prose > div.in > *:nth-child(2) { transition-delay: 0.08s; }
html.js .prose > div.in > *:nth-child(3) { transition-delay: 0.12s; }
html.js .prose > div.in > *:nth-child(4) { transition-delay: 0.16s; }
html.js .prose > div.in > *:nth-child(5) { transition-delay: 0.2s; }
html.js .prose > div.in > *:nth-child(6) { transition-delay: 0.24s; }
html.js .prose > div.in > *:nth-child(7) { transition-delay: 0.28s; }
html.js .prose > div.in > *:nth-child(8) { transition-delay: 0.32s; }
html.js .prose > div.in > *:nth-child(n + 9) { transition-delay: 0.34s; }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(217, 142, 72, 0.06), rgba(217, 142, 72, 0) 42%);
}
.fcols {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.1fr;
  gap: 2rem;
}
footer address { font-style: normal; }
footer address strong { display: block; margin-bottom: 0.5rem; font-size: 1.05rem; letter-spacing: 0.1em; }
footer address span { display: block; font-size: 16px; line-height: 1.75; color: var(--dim); }

.flinks ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 1rem;
}
.flinks a { display: inline-flex; align-items: center; min-height: 40px; font-size: 16px; color: var(--dim); }
.flinks a:hover { color: var(--amber); }

.sub { display: flex; flex-direction: column; gap: 0.6rem; max-width: 260px; }
.sub input {
  min-height: 44px;
  padding: 0 0.8rem;
  font-family: inherit;
  font-size: 16px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
}
.sub button {
  min-height: 44px;
  padding: 0 1rem;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--ink);
  background: var(--amber);
  border: 0;
  cursor: pointer;
}
.sub button:hover { background: var(--paper); }

.copy {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 6vw, 4rem) 2rem;
  font-size: 16px;
  color: var(--dim);
  border-top: 1px solid var(--line);
}

/* ---------- 断点 ---------- */
@media (max-width: 980px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    padding: 2rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-bottom: 3rem;
  }
  .rail ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
  .fcols { grid-template-columns: 1fr 1fr; }
  .sub { grid-column: 1 / -1; max-width: 100%; }
}

@media (max-width: 900px) {
  .hero { padding-top: 11vh; }
  .hero-txt { max-width: none; text-align: left; margin-left: 0; }
  .collage {
    position: static;
    width: 100%;
    margin-top: 1.8rem;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }
  .collage img { aspect-ratio: 4 / 5; }
  .collage img:nth-child(2) { width: 100%; margin-left: 0; margin-top: 1.4rem; aspect-ratio: 4 / 5; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .cta { padding: 0 0.7rem; }
  .fcols { grid-template-columns: 1fr; }
  .flinks ul { grid-template-columns: 1fr 1fr; }
  .rail ul { grid-template-columns: 1fr; }
  .prose { padding-bottom: 8vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .prose > div,
  html.js .prose > div > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .lay, .shot { transform: none !important; }
  .grp summary::after { transition: none; }
}

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