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

:root {
  --paper: #f5f5f5;
  --card: #ffffff;
  --ink: #1f1f1f;
  --line: #e2e2e2;
  --soft: #6a6a6a;
  --r: 28px;
  --pixel: 'Press Start 2P', 'VT323', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', '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(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
}

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

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

/* ---------- 顶栏 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
}

.brand {
  font-family: var(--pixel);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.burger {
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.burger[aria-expanded="true"] {
  background: var(--ink);
  color: #fff;
}

/* ---------- 全屏菜单 ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: auto;
  padding: 100px 18px 40px;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

html.menu-open body { overflow: hidden; }

.menu p {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 660px;
  margin: 0 auto;
}

.menu a {
  display: block;
  min-height: 50px;
  padding: 14px 20px;
  background: var(--card);
  border-bottom: 3px solid var(--ink);
  border-radius: 18px;
  text-decoration: none;
  font-size: 1.05rem;
  transition: transform 0.18s ease;
}

.menu a:hover { transform: translateX(4px); }

/* ---------- 头图 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
  gap: 16px;
  max-width: 1180px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 30px 18px 42px;
  overflow: hidden;
}

.hero-ghost {
  position: absolute;
  top: 0.4em;
  left: 0;
  z-index: 0;
  font-family: var(--pixel);
  font-size: clamp(2rem, 10vw, 4.6rem);
  letter-spacing: -0.02em;
  color: #e6e6e6;
  white-space: nowrap;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-copy h1 {
  margin: 0 0 0.5em;
  font-size: clamp(1.85rem, 5vw, 3.2rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.hero-lead {
  max-width: 34em;
  margin: 0;
  color: var(--soft);
  font-size: 1.02rem;
}

.hero-tile {
  position: relative;
  z-index: 1;
  align-self: end;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--card);
  border-bottom: 4px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.hero-tile:empty {
  background: repeating-linear-gradient(45deg, #ffffff, #ffffff 8px, #efefef 8px, #efefef 16px);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 主体 ---------- */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 18px 52px;
}

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

.sheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  min-width: 0;
}

.sheet > * { grid-column: span 1; }

.sheet > article {
  padding: 24px 22px 28px;
  background: var(--card);
  border-bottom: 4px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  scroll-margin-top: 96px;
  animation: rise 0.45s ease backwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sheet > article:nth-child(3n+1) { grid-column: span 2; }

.sheet > article:nth-child(1) { animation-delay: 0.02s; }
.sheet > article:nth-child(2) { animation-delay: 0.08s; }
.sheet > article:nth-child(3) { animation-delay: 0.14s; }
.sheet > article:nth-child(4) { animation-delay: 0.2s; }
.sheet > article:nth-child(5) { animation-delay: 0.26s; }
.sheet > article:nth-child(6) { animation-delay: 0.32s; }
.sheet > article:nth-child(7) { animation-delay: 0.38s; }
.sheet > article:nth-child(8) { animation-delay: 0.44s; }

.sheet > article:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.sheet small {
  display: inline-block;
  margin-bottom: 0.55em;
  font-family: var(--pixel);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--soft);
}

.sheet h2 {
  margin: 0.1em 0 0.6em;
  font-size: 1.35rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.sheet h3 {
  margin: 1.1em 0 0.45em;
  font-size: 1.08rem;
  line-height: 1.5;
}

.sheet p { margin: 0 0 1em; }
.sheet p:last-child { margin-bottom: 0; }

.sheet ul,
.sheet ol { margin: 0 0 1em; padding-left: 1.3em; }
.sheet li { margin: 0.3em 0; }
.sheet li::marker { color: var(--soft); }

.sheet a {
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}

.sheet figure { margin: 0 0 1em; }
.sheet figcaption {
  margin-top: 0.5em;
  font-size: 0.9rem;
  color: var(--soft);
}

.sheet img { border-radius: 18px; }

.sheet blockquote {
  margin: 0 0 1em;
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--line);
  color: var(--soft);
}

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.tile {
  padding: 20px;
  background: var(--card);
  border-bottom: 4px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.rail small {
  display: block;
  margin-bottom: 0.6em;
  font-family: var(--pixel);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--soft);
}

.rail h2 {
  margin: 0 0 0.85em;
  font-size: 1.08rem;
  line-height: 1.4;
}

.rail-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: block;
  min-height: 42px;
  padding: 10px 12px;
  background: var(--paper);
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.18s ease;
}

.rail-list a:hover { background: #e8e8e8; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 12px;
  padding: 48px 18px 26px;
  background: var(--ink);
  color: #ffffff;
}

.foot-cta,
.foot-cols,
.foot-base {
  max-width: 1180px;
  margin: 0 auto;
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 24px;
  background: #2b2b2b;
  border-bottom: 4px solid #ffffff;
  border-radius: var(--r);
}

.cta-text {
  max-width: 36em;
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.55;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding: 34px 0 24px;
}

.foot dt {
  margin-bottom: 0.7em;
  font-family: var(--pixel);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: #a9a9a9;
}

.foot dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
}

.foot dd a {
  display: inline-block;
  padding: 8px 0;
  margin-right: 10px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid #565656;
}

.foot dd a:hover { border-bottom-color: #ffffff; }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #3a3a3a;
  font-size: 0.9rem;
  color: #a9a9a9;
}

.foot-base p { margin: 0; }

.foot-base a {
  display: inline-block;
  padding: 6px 0;
  color: #ffffff;
  text-decoration: none;
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 62vh;
    padding-bottom: 34px;
  }

  .hero-tile {
    width: 180px;
    align-self: auto;
  }

  main { grid-template-columns: minmax(0, 1fr); }

  .rail { position: static; top: auto; }

  .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 700px) {
  .sheet { grid-template-columns: minmax(0, 1fr); }

  .sheet > article,
  .sheet > article:nth-child(3n+1) { grid-column: span 1; }

  .sheet > article { padding: 20px 18px 24px; }

  .foot-cta { padding: 22px 18px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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