@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 {
  --violet: #6514ff;
  --magenta: #bf00ff;
  --ink: #1c1726;
  --paper: #f8f5ff;
  --paper2: #eee5ff;
  --tint: #ffdcfa;
  --acid: #ccff33;
  --edge: 3px solid var(--ink);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }
html.locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-family: Calistoga, Inter, 'PingFang SC', 'Noto Sans SC', serif;
  line-height: 1.1;
  letter-spacing: .01em;
}

/* 顶部细条 */
.strip {
  background: var(--ink);
  color: var(--tint);
  overflow: hidden;
  border-bottom: var(--edge);
}
.strip-track {
  display: flex;
  width: max-content;
  padding: 6px 0;
  font-size: 12px;
  letter-spacing: .24em;
  animation: slide 36s linear infinite;
}
.strip-track span { padding: 0 18px; white-space: nowrap; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 两行页头 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--edge);
}
.brandrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px 6px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
}
.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--violet);
  color: #fff;
  font-family: Calistoga, serif;
  font-size: 20px;
  object-fit: cover;
}
.brandtxt {
  font-family: Calistoga, Inter, serif;
  font-size: 26px;
  letter-spacing: .02em;
}
.menurow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px 10px;
}
.burger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  letter-spacing: .18em;
  cursor: pointer;
  transition: background .22s ease, transform .22s ease;
}
.burger:hover { background: var(--magenta); transform: translateY(-2px); }
.bars {
  position: relative;
  width: 22px;
  height: 16px;
}
.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}
.bars::before { top: 2px; box-shadow: 0 5px 0 currentColor; }
.bars::after { bottom: 2px; }

/* 全屏遮罩菜单 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  color: #fff;
  overflow-y: auto;
  visibility: hidden;
  transform: translateY(-101%);
  transition: transform .28s cubic-bezier(.7, 0, .3, 1), visibility .28s linear;
}
.overlay.open { transform: none; visibility: visible; }
.overlay-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 22px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ovbrand {
  margin: 0;
  font-family: Calistoga, serif;
  font-size: 22px;
  letter-spacing: .06em;
  color: var(--acid);
}
.ovlist { list-style: none; margin: 0; padding: 0; }
.ovlist a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 6px 4px;
  text-decoration: none;
  font-family: Calistoga, Inter, serif;
  font-size: 24px;
  border-bottom: 1px solid #3a3350;
  transition: color .2s ease, transform .2s ease;
}
.ovlist a:hover { color: var(--acid); transform: translateX(6px); }
.idx {
  flex: none;
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--magenta);
}
.ovtop {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--violet);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .14em;
}
.ovtop:hover { background: var(--magenta); }

/* 左栏 + 主区 */
.frame { display: grid; grid-template-columns: 236px minmax(0, 1fr); }

.rail {
  position: sticky;
  top: 128px;
  align-self: start;
  padding: 26px 16px 40px;
  background: var(--paper2);
  border-right: var(--edge);
}
.railtitle {
  margin: 0 0 14px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  letter-spacing: .3em;
}
.railtitle span { background: var(--ink); color: #fff; padding: 3px 8px; }
.raillist { list-style: none; margin: 0 0 22px; padding: 0; }
.raillist a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid #d3c5f2;
  transition: color .2s ease, padding-left .2s ease;
}
.raillist a:hover,
.raillist a.on { color: var(--violet); padding-left: 6px; }
.raillist a.on .idx { color: var(--magenta); }
.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  background: var(--violet);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .12em;
  transition: background .2s ease;
}
.totop:hover { background: var(--magenta); }

/* 首屏 */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
  padding: 54px 32px 76px;
  overflow: hidden;
  border-bottom: var(--edge);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(122deg, rgba(101, 20, 255, .10) 0 12px, transparent 12px 34px);
  animation: drift 18s linear infinite;
}
@keyframes drift { to { background-position: 340px 0; } }
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 56px;
  background: var(--ink);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 1;
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(40px, 7vw, 80px); }
.hero h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 14px;
  margin-top: 20px;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}
.lede {
  max-width: 36ch;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: #3b3450;
}
.hero-art { position: relative; z-index: 2; min-height: 320px; }
.hero-art::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80%;
  height: 72%;
  background: var(--magenta);
  opacity: .2;
  clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%);
}
.hero-shot {
  position: absolute;
  border: 4px solid var(--ink);
  object-fit: cover;
  box-shadow: 14px 14px 0 rgba(101, 20, 255, .32);
}
.s1 { width: 70%; top: 0; left: 0; transform: rotate(-3deg); }
.s2 {
  width: 56%;
  right: 0;
  bottom: 0;
  transform: rotate(4deg);
  box-shadow: 14px 14px 0 rgba(191, 0, 255, .32);
}

/* 正文 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.body { padding: 8px 0 80px; }
.prose { counter-reset: sec; }
.prose > div {
  position: relative;
  margin-top: 48px;
  padding: 56px 0 8px;
  border-top: var(--edge);
  scroll-margin-top: 140px;
}
.prose > div:first-child { margin-top: 0; border-top: 0; }
.prose > div::before {
  content: counter(sec, decimal-leading-zero);
  counter-increment: sec;
  position: absolute;
  top: -15px;
  right: 0;
  padding: 4px 10px;
  background: var(--ink);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .16em;
}
.prose h2 {
  max-width: 22ch;
  margin: 0 0 20px;
  font-size: clamp(28px, 4.2vw, 44px);
}
.prose h2 span {
  padding: 0 .06em;
  background: linear-gradient(180deg, transparent 62%, var(--tint) 62%, var(--tint) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.prose h3 { margin: 30px 0 10px; font-size: 22px; }
.prose h3 span { color: var(--violet); }
.prose p {
  max-width: 66ch;
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.8;
  color: #241f33;
}
.prose ul,
.prose ol { max-width: 66ch; padding-left: 22px; }
.prose li { margin: 8px 0; line-height: 1.75; }
.prose a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--magenta); }
.prose strong { background: var(--acid); padding: 0 3px; }
.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 8px solid var(--magenta);
  background: var(--paper2);
  font-size: 17px;
}
.prose blockquote p { margin: 0; }
.prose img { margin: 22px 0; border: 4px solid var(--ink); }
.prose figure { margin: 24px 0; }
.prose figcaption { font-size: 14px; color: #5b5273; }

/* 页脚 */
.foot {
  padding: 48px 24px 26px;
  background: var(--ink);
  color: #efe9ff;
  border-top: 8px solid var(--magenta);
}
.footgrid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.faddr { font-style: normal; font-family: Calistoga, Inter, serif; font-size: 22px; color: #fff; }
.faddr .fbrand { display: inline-block; padding-bottom: 6px; border-bottom: 5px solid var(--violet); }
.fcol ul { list-style: none; margin: 0; padding: 0; }
.fcol a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  text-decoration: none;
  font-size: 15px;
  color: #cfc4ee;
  transition: color .2s ease, transform .2s ease;
}
.fcol a:hover { color: var(--acid); transform: translateX(4px); }
.bottom {
  max-width: 1080px;
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid #3b3450;
  text-align: center;
  font-size: 13px;
  letter-spacing: .1em;
  color: #a99fc8;
}

/* 滚动揭示 */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease var(--d, 0ms), transform .45s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms);
}

@media (max-width: 900px) {
  .frame { grid-template-columns: 1fr; }
  main { order: 1; }
  .rail {
    order: 2;
    position: static;
    padding: 24px 18px 34px;
    border-right: 0;
    border-top: var(--edge);
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 34px 18px 64px;
    gap: 26px;
  }
  .hero-art { min-height: 270px; }
  .hero h1 { font-size: 44px; }
  .wrap { padding: 0 18px; }
  .prose > div { scroll-margin-top: 156px; padding-top: 46px; }
  .footgrid { grid-template-columns: 1fr 1fr; }
  .faddr { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .footgrid { grid-template-columns: 1fr; gap: 18px; }
  .hero h1 { font-size: 38px; }
  .lede { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip-track,
  .hero::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

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