@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
  --ink: #111114;
  --paper: #F2EFE7;
  --amber: #D9482B;
  --line: rgba(242, 239, 231, 0.2);
  --dim: rgba(242, 239, 231, 0.64);
  --serif: 'Source Serif 4', Georgia, 'Songti SC', 'SimSun', serif;
  --display: 'Playfair Display', Georgia, 'Songti SC', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: -4px;
  z-index: 70;
  pointer-events: none;
  opacity: 0.06;
  background-image: radial-gradient(var(--paper) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  animation: grain 1.4s steps(3, end) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-1px, 1px); }
  66% { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

h1, h2, h3 { margin: 0; }

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

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

/* ---------- 顶部两行 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.top-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem) 0.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
}

.logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 6px;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border-radius: 18px;
  background: var(--amber);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.cta:hover { transform: translateY(-2px); filter: brightness(1.12); }

.top-menu {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 0.7rem;
}

/* ---------- 抽屉 ---------- */

.drawer { width: 100%; }

.drawer > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--paper);
  cursor: pointer;
  list-style: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary:hover { border-color: var(--amber); color: var(--amber); }

.bars {
  display: block;
  width: 17px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.drawer[open] > summary {
  position: relative;
  z-index: 90;
  background: var(--ink);
  border-color: var(--amber);
  color: var(--amber);
}

.drawer[open] .bars {
  transform: rotate(45deg);
  border-bottom-color: transparent;
}

.drawer > menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  margin: 0;
  padding: 8rem clamp(1.2rem, 6vw, 3rem) 3rem;
  list-style: none;
  background: var(--ink);
  display: grid;
  align-content: start;
  gap: 0;
  overflow: auto;
}

.drawer > menu li {
  opacity: 0;
  transform: translateY(0.6rem);
  animation: slideIn 0.42s cubic-bezier(0.2, 0.75, 0.3, 1) forwards;
}

.drawer > menu li:nth-child(1) { animation-delay: 40ms; }
.drawer > menu li:nth-child(2) { animation-delay: 85ms; }
.drawer > menu li:nth-child(3) { animation-delay: 130ms; }
.drawer > menu li:nth-child(4) { animation-delay: 175ms; }
.drawer > menu li:nth-child(5) { animation-delay: 220ms; }
.drawer > menu li:nth-child(6) { animation-delay: 265ms; }
.drawer > menu li:nth-child(7) { animation-delay: 310ms; }

@keyframes slideIn {
  to { opacity: 1; transform: none; }
}

.drawer > menu a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  line-height: 1.15;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.drawer > menu a:hover { color: var(--amber); transform: translateX(0.5rem); }

/* ---------- 通用容器 ---------- */

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 5vw, 3rem);
  align-items: start;
  min-height: 70vh;
  padding-block: clamp(2.4rem, 9vh, 5.5rem) clamp(2.4rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.hero-copy { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.26em;
  color: var(--amber);
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  position: relative;
  display: block;
  margin: 0;
  padding-bottom: 0.5rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 8.5vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--paper);
}

.hero h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4.5rem;
  height: 5px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  animation: rule 0.85s 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes rule {
  to { transform: scaleX(1); }
}

.chr {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 26ms + 120ms);
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.lead {
  max-width: 46ch;
  margin: 1.3rem 0 0;
  color: var(--dim);
  line-height: 1.8;
}

.hero-mark {
  margin: 0;
  width: clamp(76px, 15vw, 148px);
  color: var(--amber);
  animation: spin 28s linear infinite;
}

.mark { display: block; width: 100%; height: auto; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.badge {
  position: absolute;
  right: 0;
  bottom: 0.5rem;
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--amber);
  border-radius: 18px;
  background: var(--ink);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  animation: bob 5.5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- 正文 + 侧栏 ---------- */

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-block: clamp(2rem, 5vw, 3.6rem);
}

.content { min-width: 0; }

.content > article {
  padding-block: clamp(1.8rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 8rem;
}

.content > article:first-child {
  padding-top: 0;
  border-top: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease var(--d, 0ms), transform 0.55s ease var(--d, 0ms);
}

.reveal.in { opacity: 1; transform: none; }

.content h2 {
  position: relative;
  padding-left: 1.15rem;
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--amber);
}

.content .subtitle {
  margin: 0 0 1.15rem;
  color: var(--amber);
  font-style: italic;
  line-height: 1.6;
}

.content h3 {
  margin: 1.7rem 0 0.5rem;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.4;
}

.content p,
.content li {
  max-width: 64ch;
  margin: 0 0 1rem;
  line-height: 1.85;
}

.content ul,
.content ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.content li { margin-bottom: 0.45rem; }

.content blockquote {
  margin: 1.3rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--amber);
  color: var(--dim);
  font-style: italic;
}

.content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.content strong { color: var(--paper); }

.rail {
  position: sticky;
  top: 7.2rem;
  padding: 1.15rem 1.05rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.rail h2 {
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.rail .subtitle {
  margin: 0.3rem 0 0.9rem;
  color: var(--amber);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.5;
}

.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.92rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.rail a:hover { color: var(--paper); padding-left: 0.35rem; }

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

.foot {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(1.8rem, 6vw, 3.2rem) clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}

.foot-cta p {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.4rem, 5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.foot-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1.05rem;
  border: 1px solid var(--paper);
  border-radius: 18px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: background 0.22s ease, color 0.22s ease;
}

.foot-top:hover { background: var(--paper); color: var(--ink); }

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.2rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem) 1.6rem;
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.55rem;
  color: var(--dim);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-nav a:hover { color: var(--amber); }

.copy {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--dim);
}

/* ---------- 窄屏 ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-block: 2rem 2.6rem;
  }

  .hero-mark { order: -1; width: 58px; }

  .badge { position: static; display: inline-block; margin-top: 1.4rem; animation: none; }

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

  .rail { position: static; margin-top: 0.5rem; }

  .content > article { scroll-margin-top: 7rem; }

  .foot-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand { font-size: 1.15rem; }
  .foot-nav { gap: 0; }
}

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

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

  .chr { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}

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