@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');

:root {
  --paper: #fafaf8;
  --mid: #4a4a4a;
  --ink: #1a1a1a;
  --card: #f1f0ec;
  --card-alt: #ebeae5;
  --tape: rgba(74, 74, 74, 0.18);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, 'PingFang SC', 'Microsoft YaHei', monospace;
  --hud: 'Orbitron', 'JetBrains Mono', ui-monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --dock: 66px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: calc(var(--dock) + 20px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  filter: contrast(1.02);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(rgba(26, 26, 26, 0.07) 0.5px, transparent 0.6px),
    radial-gradient(rgba(74, 74, 74, 0.05) 0.5px, transparent 0.6px);
  background-size: 4px 4px, 9px 9px;
  background-position: 0 0, 3px 5px;
}

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

h1, h2, h3 {
  font-family: var(--hud);
  line-height: 1.28;
  margin: 0;
  letter-spacing: 0.01em;
}

a { color: var(--ink); }

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

.frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: clamp(20px, 3vw, 46px);
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 32px);
}

.col { min-width: 0; }

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

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(18px, 3vw, 36px);
  align-items: center;
  min-height: calc(100vh - 130px);
  padding: clamp(26px, 5vw, 62px) 0 clamp(22px, 4vw, 46px);
}

.hero-copy { min-width: 0; text-align: left; }

.eyebrow {
  display: inline-block;
  font-size: 16px;
  color: var(--mid);
  letter-spacing: 0.22em;
  padding: 2px 9px;
  background: var(--tape);
  border-radius: 3px;
  transform: rotate(-1.6deg);
}

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  margin: 0.42em 0 0.34em;
  transform: rotate(-1deg);
  overflow-wrap: break-word;
}

.hero h1::after {
  content: "";
  display: block;
  width: min(230px, 62%);
  height: 6px;
  margin-top: 0.4em;
  background: var(--ink);
  opacity: 0.72;
  border-radius: 60% 40% 55% 45% / 60% 50% 50% 40%;
}

.lede {
  font-size: 17px;
  color: var(--mid);
  max-width: 44ch;
  margin: 0 0 1.4em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 10px;
  font-size: 16px;
  transform: rotate(0.8deg);
  transition: transform 0.12s linear;
}

.hero-cta:hover { transform: rotate(0.8deg) translate(-2px, -2px); }

.hero-media {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  will-change: transform;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  opacity: 0;
  filter: grayscale(1) contrast(1.12);
  transform: rotate(1.1deg);
  background: var(--card);
  transition: opacity 0.18s linear;
}

.slide.is-on { opacity: 1; }

.blot {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  transform: rotate(1.2deg);
  background: repeating-linear-gradient(45deg, var(--card-alt) 0 10px, var(--card) 10px 20px);
}

/* ---------- 正文 ---------- */

.paper { padding-bottom: clamp(30px, 6vw, 70px); }

.paper > article {
  position: relative;
  background: var(--card);
  border-radius: 10px;
  padding: clamp(18px, 3vw, 34px);
  margin: 0 0 clamp(22px, 4vw, 38px);
  transform: rotate(-0.2deg);
  scroll-margin-top: 24px;
}

.paper > article:nth-child(even) {
  transform: rotate(0.22deg);
  background: var(--card-alt);
}

.paper > article::before {
  content: "";
  position: absolute;
  top: -9px;
  left: clamp(18px, 4vw, 40px);
  width: 68px;
  height: 17px;
  background: var(--tape);
  border-radius: 2px;
  opacity: 0.8;
  transform: rotate(-2.5deg);
}

.paper h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  margin: 0 0 0.55em;
}

.paper h3 {
  font-size: 1.08rem;
  margin: 1.5em 0 0.4em;
  color: var(--mid);
}

.paper small {
  display: block;
  font-size: 16px;
  color: var(--mid);
  letter-spacing: 0.14em;
  margin-bottom: 0.2em;
}

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

.paper ul,
.paper ol { margin: 0 0 1em; padding-left: 1.35em; }
.paper li { margin: 0.35em 0; }

.paper blockquote {
  margin: 1.2em 0;
  padding: 0.3em 1em;
  border-left: 4px solid var(--mid);
  color: var(--mid);
}

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

.paper table { width: 100%; border-collapse: collapse; font-size: 16px; }
.paper th,
.paper td { padding: 8px 10px; text-align: left; border-bottom: 1px dashed rgba(74, 74, 74, 0.4); }

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

.rail {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 30px 0 0;
  transform: rotate(0.5deg);
}

.rail small {
  display: block;
  font-size: 16px;
  color: var(--mid);
  letter-spacing: 0.16em;
}

.rail h2 {
  font-size: 1.12rem;
  margin: 0.18em 0 0.85em;
  padding-bottom: 0.34em;
  border-bottom: 2px dashed var(--mid);
}

.rail dl { margin: 0; display: grid; gap: 4px; }
.rail dt { margin: 0; }

.rail a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-height: 42px;
  padding: 7px 8px;
  font-size: 16px;
  text-decoration: none;
  border-radius: 8px;
}

.rail a:hover { background: var(--card); }
.rail .num { font-family: var(--hud); font-size: 16px; color: var(--mid); }

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

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--dock);
  padding: 0 clamp(10px, 2vw, 22px);
  background: rgba(250, 250, 248, 0.97);
  border-top: 2px dashed var(--mid);
}

.dock-brand { flex: 0 0 auto; }

.dock-brand a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--hud);
  font-size: 18px;
  transform: rotate(-2deg);
}

.dock-brand img { width: 26px; height: 26px; object-fit: contain; }

.dock-nav {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-nav::-webkit-scrollbar { display: none; }

.dock-nav dl {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  width: max-content;
}

.dock-nav dt { margin: 0; flex: 0 0 auto; }

.dock-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  font-size: 16px;
  color: var(--mid);
  text-decoration: none;
  border-radius: 10px;
  white-space: nowrap;
}

.dock-nav a:hover,
.dock-nav a:focus-visible { background: var(--card); color: var(--ink); }

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50% 40% 55% 45%;
  background: var(--mid);
}

.dock-end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.copy { font-size: 16px; color: var(--mid); white-space: nowrap; }

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 10px;
  font-size: 16px;
  transform: rotate(-1deg);
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 24px;
  }
  .hero-media {
    max-width: none;
    margin: 6px 0 0;
    aspect-ratio: 16 / 10;
  }
  .rail {
    position: static;
    max-height: none;
    order: 2;
    padding: 4px 0 44px;
    transform: none;
  }
  .rail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  :root { --dock: 62px; }
  body { font-size: 16px; }
  .hero h1 { font-size: clamp(1.7rem, 8.6vw, 2.3rem); }
  .copy { display: none; }
  .dock-nav a { padding: 0 10px; }
  .paper > article { padding: 16px 14px; }
  .rail dl { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero h1,
  .hero-media,
  .slide,
  .blot,
  .paper > article,
  .rail,
  .dock-brand a,
  .cta,
  .hero-cta { transform: none !important; }
}

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