@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

:root {
  --ink: #1B1B3A;
  --ink2: #2B2B58;
  --ink3: #3A3A6E;
  --pink: #FF3B6B;
  --pink-d: #B81643;
  --yel: #FFD23F;
  --paper: #FFF7EA;
  --soft: #FFE7D2;
  --mute: rgba(255, 247, 234, .72);
  --hair: rgba(255, 247, 234, .18);
  --hair-ink: rgba(27, 27, 58, .18);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "VT323", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.68;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--yel); text-decoration: none; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.32; font-weight: 700; letter-spacing: .02em; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; }

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

/* ---------- 顶部 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: var(--ink);
  border-bottom: 3px solid var(--pink);
  position: relative;
  z-index: 40;
}

.burger {
  display: none;
  font-family: inherit;
  font-size: 16px;
  background: var(--yel);
  color: var(--ink);
  border: 0;
  cursor: pointer;
}

.menu { min-width: 0; }
.menu ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--paper);
  border: 2px solid var(--ink3);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.menu a:hover, .menu a:focus-visible {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--ink);
}

.m-left { flex: 1 1 0; }
.m-right { flex: 1 1 0; display: flex; justify-content: flex-end; }
.m-right ul { justify-content: flex-end; }

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  padding: 4px;
}
.brand:hover { color: var(--paper); }
.mark {
  font-family: "Press Start 2P", "VT323", monospace;
  font-size: 12px;
  line-height: 1.4;
  background: var(--yel);
  color: var(--ink);
  padding: 9px 9px;
  display: inline-block;
}
.bname { font-size: 21px; letter-spacing: .1em; }

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 16px;
  background: var(--pink);
  color: var(--ink);
  border: 2px solid var(--pink);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.cta:hover { background: var(--yel); border-color: var(--yel); color: var(--ink); }

/* ---------- 粘性锚点条 ---------- */
.stickbar {
  position: sticky;
  top: 0;
  z-index: 35;
  background: var(--yel);
  border-bottom: 3px solid var(--ink);
}
.stick-in {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stick-in::-webkit-scrollbar { display: none; }
.stick-in a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-size: 16px;
  color: var(--ink);
  border: 2px solid var(--ink);
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.stick-in a:hover, .stick-in a.on { background: var(--ink); color: var(--yel); }

/* ---------- 版式骨架 ---------- */
main { padding-bottom: 8px; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  grid-template-areas:
    "hero hero"
    "content rail";
  gap: 34px 40px;
  align-items: start;
}

/* ---------- 首屏 ---------- */
.hero {
  grid-area: hero;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 36px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 44px 0;
  border-bottom: 6px solid var(--pink);
}

.collage {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  min-height: 54vh;
}
.tile { overflow: hidden; border: 4px solid var(--ink2); }
.tile-ph { display: block; width: 100%; height: 100%; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.t1 { grid-area: 1 / 1 / 5 / 6; background: var(--pink); }
.t1 .tile-ph { background: var(--pink); }
.t2 { grid-area: 3 / 4 / 7 / 7; background: var(--yel); }
.t2 .tile-ph { background: var(--yel); }

.hero-main { text-align: right; }
.eyebrow {
  display: inline-block;
  font-family: "Press Start 2P", "VT323", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  background: var(--yel);
  color: var(--ink);
  padding: 10px 12px;
  margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 56px);
  color: var(--paper);
  margin: 0 0 16px;
}
.lede {
  font-size: 17px;
  color: var(--mute);
  max-width: 34em;
  margin-left: auto;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  font-size: 16px;
  color: var(--paper);
  border: 2px solid var(--paper);
  background: transparent;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn-y { background: var(--yel); color: var(--ink); border-color: var(--yel); }
.btn-y:hover { background: var(--pink); border-color: var(--pink); color: var(--ink); }

/* ---------- 正文 ---------- */
.content { grid-area: content; min-width: 0; }

.prose {
  background: var(--paper);
  color: var(--ink);
  padding: 30px 26px;
  border-bottom: 6px solid var(--pink);
}
.prose > * { min-width: 0; }
.prose div { scroll-margin-top: 92px; }
.prose > div + div {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid var(--hair-ink);
}
.prose h2 { font-size: 25px; margin-bottom: 8px; }
.prose h3 { font-size: 20px; }
.prose h2 + hr {
  border: 0;
  height: 4px;
  width: 68px;
  background: var(--pink);
  margin: 0 0 16px;
}
.prose hr {
  border: 0;
  height: 2px;
  background: var(--hair-ink);
  margin: 22px 0;
}
.prose p { margin-bottom: 14px; }
.prose strong { background: var(--yel); padding: 0 2px; }
.prose a {
  color: var(--pink-d);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}
.prose a:hover { background: var(--yel); color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--soft);
  border-left: 6px solid var(--pink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { margin: 0 0 18px; border: 3px solid var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 16px; }
.prose th, .prose td { border: 2px solid var(--hair-ink); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--soft); }
.prose figure { margin: 0 0 18px; }
.prose figcaption { font-size: 16px; color: #5A5A80; }
.prose code, .prose pre {
  font-family: "VT323", ui-monospace, monospace;
  background: var(--soft);
  border: 2px solid var(--hair-ink);
}
.prose code { padding: 1px 5px; }
.prose pre { padding: 14px; overflow-x: auto; }
.prose pre code { border: 0; background: transparent; padding: 0; }

/* ---------- 右侧栏 ---------- */
.rail {
  grid-area: rail;
  align-self: start;
  position: sticky;
  top: 76px;
  padding: 8px 0 0;
}
.rail h2 { font-size: 18px; color: var(--yel); letter-spacing: .14em; margin: 0 0 8px; }
.rail hr { border: 0; height: 3px; width: 40px; background: var(--yel); margin: 0 0 16px; }
.rail ul { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--ink3); }
.rail li { margin: 0; }
.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 12px;
  font-size: 16px;
  color: var(--paper);
  border-bottom: 2px solid var(--ink3);
  transition: background .15s ease, color .15s ease, padding-left .15s ease;
}
.rail a:hover {
  background: var(--pink);
  color: var(--ink);
  padding-left: 18px;
  border-bottom-color: var(--pink);
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 44px;
  background: var(--ink2);
  border-top: 6px solid var(--yel);
}
.foot-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 34px 24px;
  background: var(--pink);
  color: var(--ink);
}
.foot-cta h2 { margin: 0; font-size: clamp(22px, 3vw, 34px); color: var(--ink); letter-spacing: .08em; }

.foot-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 24px;
}
.foot-brand address {
  font-style: normal;
  font-size: 19px;
  letter-spacing: .06em;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--pink);
  display: inline-block;
}
.foot-desc { color: var(--mute); font-size: 16px; margin-top: 14px; max-width: 32em; }

.foot-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.foot-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 10px;
  font-size: 16px;
  color: var(--paper);
  border-left: 3px solid var(--ink3);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.foot-links a:hover { background: var(--yel); color: var(--ink); border-left-color: var(--yel); }

.copy {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px 26px;
  font-size: 16px;
  color: var(--mute);
  border-top: 2px solid var(--hair);
}

/* ---------- 动效 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .28s ease, transform .28s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .rail a, .menu a, .btn, .stick-in a, .foot-links a { transition: none; }
}

/* ---------- 断点 ---------- */
@media (max-width: 1080px) {
  .menu a { padding: 0 10px; }
  .bname { font-size: 19px; }
}

@media (max-width: 1000px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "content" "rail";
    gap: 26px;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 26px 0 30px;
    gap: 22px;
  }
  .hero-main { order: -1; text-align: left; }
  .lede { margin-left: 0; }
  .hero-cta { justify-content: flex-start; }
  .collage { min-height: 34vh; }
  .rail { position: static; padding: 0 0 8px; }
  .rail ul { display: grid; grid-template-columns: 1fr 1fr; border-left: 0; }
  .rail a { border-bottom: 2px solid var(--ink3); }
}

@media (max-width: 900px) {
  .topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
  }
  .burger {
    display: inline-flex;
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }
  .brand { grid-column: 2; grid-row: 1; justify-self: center; text-align: center; }
  .bname { font-size: 18px; }
  .cta { grid-column: 3; grid-row: 1; padding: 0 14px; }

  .menu { display: none; justify-content: flex-start; }
  .topbar.open .menu { display: block; }
  .m-left { grid-column: 1 / -1; grid-row: 2; }
  .m-right { grid-column: 1 / -1; grid-row: 3; }
  .menu ul { flex-direction: column; gap: 6px; }
  .m-right ul { justify-content: flex-start; }
  .menu a { width: 100%; padding: 0 14px; min-height: 44px; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding: 0 14px; }
  .prose { padding: 22px 16px; }
  .prose h2 { font-size: 22px; }
  .foot-grid { grid-template-columns: 1fr; gap: 18px; padding: 26px 16px; }
  .foot-cta { padding: 26px 16px; }
  .foot-cta h2 { font-size: 22px; }
  .copy { padding: 14px 16px 24px; }
  .rail ul { grid-template-columns: 1fr; }
}

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