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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --u: 8px;
  --r: 18px;
  --dock: 64px;
  --gutter: clamp(16px, 4vw, 56px);
  --pixel: 'Press Start 2P', 'VT323', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, 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;
  padding-bottom: calc(var(--dock) + 24px);
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.25;
}

p {
  margin: 0 0 1em;
}

small {
  display: block;
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: .12em;
  opacity: .6;
}

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

/* ---------- 角标 ---------- */

.brandmark {
  position: fixed;
  top: 16px;
  left: var(--gutter);
  z-index: 60;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 16px;
}

.brandmark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: 84px var(--gutter) 40px;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: .16;
  pointer-events: none;
}

.hero-art {
  position: relative;
  grid-column: 1 / 7;
  height: 42vh;
  min-height: 190px;
}

.hero-shot {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--ink);
  will-change: transform;
}

.hero-shot-a {
  left: 0;
  top: 0;
  width: 64%;
  height: 72%;
}

.hero-shot-b {
  right: 0;
  bottom: 0;
  width: 56%;
  height: 60%;
  background: var(--paper);
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 8px 8px;
  box-shadow: 0 0 0 3px var(--paper);
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 1 / 7;
  align-self: end;
  text-align: right;
}

.hero-title {
  margin: 0;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  text-decoration: none;
  font-size: 17px;
}

/* ---------- 正文骨架 ---------- */

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.entry {
  margin-top: 40px;
}

.entry > div {
  margin: 0 0 16px;
  padding: clamp(20px, 4vw, 40px);
  background: var(--paper);
  border-radius: var(--r);
  scroll-margin-top: 24px;
  scroll-margin-bottom: calc(var(--dock) + 24px);
}

.entry > div:nth-child(even) {
  background: var(--ink);
  color: var(--paper);
}

.entry > div:first-child {
  margin-top: 0;
}

.entry h2 {
  font-size: clamp(21px, 3vw, 28px);
  letter-spacing: -.01em;
}

.entry h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 6px;
  margin-top: 12px;
  background: currentColor;
}

.entry h3 {
  font-size: 19px;
}

.entry a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.entry img {
  display: block;
  width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: var(--r);
}

.entry ul,
.entry ol {
  padding-left: 1.2em;
}

.entry li {
  margin: 0 0 .4em;
}

.entry blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: var(--r);
  background: rgba(0, 0, 0, .06);
}

.entry > div:nth-child(even) blockquote {
  background: rgba(255, 255, 255, .14);
}

/* ---------- 侧栏 ---------- */

.side {
  margin: 24px 0 0;
  padding: 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
}

.side-kicker {
  color: var(--paper);
  opacity: .6;
}

.side-title {
  margin: 6px 0 16px;
  font-size: 22px;
}

.side-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.5;
  border-top: 1px solid #262626;
}

.side-menu a:hover {
  background: #1c1c1c;
}

/* ---------- 页脚 ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  margin-top: 64px;
  padding: 20px var(--gutter);
  border-top: 4px solid var(--ink);
  font-size: 16px;
}

.foot-brand a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 16px;
}

.foot-brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 14px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.foot-nav a:hover {
  border-bottom-color: var(--ink);
}

.foot-copy {
  letter-spacing: .04em;
}

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: var(--dock);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  background: var(--ink);
  color: var(--paper);
}

.menu-btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: #1a1a1a;
  color: var(--paper);
  cursor: pointer;
  font-family: var(--pixel);
  font-size: 16px;
  letter-spacing: .1em;
}

.menu-btn::-webkit-details-marker {
  display: none;
}

.menu-btn::before {
  content: "";
  width: 12px;
  height: 12px;
  background-image:
    repeating-linear-gradient(0deg, var(--paper) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(90deg, var(--paper) 0 2px, transparent 2px 4px);
}

.dock-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  display: grid;
  gap: 2px;
  max-height: 68vh;
  overflow: auto;
  padding: 8px 8px 14px;
  background: var(--ink);
  border-top: 1px solid #2a2a2a;
}

.dock-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: var(--paper);
  text-decoration: none;
  border-radius: 12px;
  font-size: 17px;
}

.dock-menu a:hover {
  background: #1e1e1e;
}

.dock-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  text-decoration: none;
  font-size: 16px;
}

/* ---------- 动效 ---------- */

.will-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 桌面 ---------- */

@media (min-width: 920px) {
  .hero {
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    align-items: center;
    padding: 104px var(--gutter) 64px;
  }

  .hero-art {
    grid-column: 1 / 7;
    height: min(64vh, 560px);
    min-height: 320px;
  }

  .hero-copy {
    grid-column: 7 / 13;
    align-self: center;
  }

  .hero-title {
    font-size: clamp(36px, 4.4vw, 60px);
  }

  .wrap {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 24px;
    align-items: start;
  }

  .body-col {
    grid-column: 1 / 9;
  }

  .side {
    grid-column: 10 / 13;
    position: sticky;
    top: 24px;
    margin: 40px 0 0;
  }

  .dock-menu {
    left: auto;
    right: 12px;
    bottom: calc(100% + 8px);
    width: 280px;
    border-radius: var(--r);
    border-top: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  }
}

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

  .will-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-shot {
    transform: none !important;
  }
}

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