@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

:root {
  --red: #FF5A36;
  --yellow: #FFC93C;
  --ink: #111111;
  --paper: #FFF6EA;
  --wrap: 1180px;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: .01em;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

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

/* ---------- 顶部 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--yellow);
  border-bottom: 3px solid var(--red);
}

.site-head .bar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 2px solid var(--yellow);
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  overflow: hidden;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease;
}
.brand:hover { background: var(--yellow); border-color: var(--red); color: var(--ink); }
.brand img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark { font-size: 22px; font-weight: 700; line-height: 1; }

.nav { flex: 1 1 auto; min-width: 0; }
.nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--yellow);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color .18s ease, color .18s ease;
}
.nav a:hover { background: var(--yellow); color: var(--ink); }

.search {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.search input {
  width: 148px;
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-size: 16px;
  color: var(--yellow);
  background: #000;
  border: 2px solid var(--yellow);
  border-radius: 4px;
}
.search input::placeholder { color: #9a8a5e; }
.search button {
  min-height: 44px;
  padding: 8px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.search button:hover { background: var(--red); border-color: var(--red); color: #fff; }

.menu { display: none; margin-left: auto; }
.menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--red);
  border: 2px solid var(--red);
  border-radius: 4px;
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--yellow); border-color: var(--yellow); }

.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  padding: 14px 18px 20px;
  background: var(--ink);
  border-bottom: 3px solid var(--red);
}
.menu-group { min-width: 0; }
.menu-cap {
  display: block;
  padding: 6px 2px;
  font-size: 15px;
  letter-spacing: .16em;
  color: var(--red);
  font-weight: 700;
}
.menu-group a {
  display: block;
  padding: 12px 4px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--yellow);
  text-decoration: none;
  border-bottom: 1px solid #2b2b2b;
}
.menu-group a:hover { color: var(--ink); background: var(--yellow); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--yellow);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}

.hero .wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.hero-copy { order: 2; text-align: right; min-width: 0; }

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6.4vw, 5rem);
  line-height: .98;
  letter-spacing: -.02em;
  font-weight: 700;
}
.hero h1 span {
  display: inline;
  background: var(--ink);
  color: var(--yellow);
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.collage {
  order: 1;
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 300px;
}

.shot {
  position: absolute;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: var(--red);
}
.shot-a { width: 62%; left: 0; top: 4%; }
.shot-b { width: 56%; right: 0; bottom: 4%; background: var(--ink); }
.shot-img { width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute;
  right: 2%;
  top: 0;
  z-index: 3;
  padding: 8px 12px;
  background: var(--red);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  transform: rotate(-7deg);
}

/* ---------- 主体 ---------- */
main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 52px 18px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 34px;
  align-items: start;
}

section { min-width: 0; }

.prose {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 26px clamp(16px, 3vw, 40px) 36px;
}

.prose > div + div {
  margin-top: 36px;
  padding-top: 30px;
  border-top: 3px solid var(--yellow);
}

.prose div[id],
.rail { scroll-margin-top: 118px; }

.prose h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.16;
  letter-spacing: -.015em;
  font-weight: 700;
  border-left: 9px solid var(--red);
  padding-left: 12px;
}
.prose h3 {
  margin: 1.5em 0 .5em;
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 700;
}

.prose hr {
  border: 0;
  border-top: 3px solid var(--ink);
  margin: 0 0 20px;
}
.prose h2 + hr, .prose h3 + hr { margin-top: -2px; }

.prose p { margin: 0 0 1.05em; }
.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--yellow);
  font-weight: 600;
}
.prose a:hover { background: var(--yellow); border-bottom-color: var(--red); }

.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin: 0 0 .45em; }
.prose li::marker { color: var(--red); font-weight: 700; }

.prose strong { font-weight: 700; }

.prose img {
  border: 3px solid var(--ink);
  border-radius: 4px;
  margin: 1.2em 0;
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  background: var(--paper);
  border-left: 8px solid var(--yellow);
  border-radius: 4px;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 16px;
}
.prose th, .prose td {
  border: 2px solid var(--ink);
  padding: 9px 11px;
  text-align: left;
}
.prose th { background: var(--yellow); }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 108px;
  background: var(--ink);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 18px 16px 22px;
}
.rail h2 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--yellow);
}
.rail hr {
  border: 0;
  border-top: 3px solid var(--red);
  margin: 0 0 12px;
}
.rail ol {
  list-style: none;
  counter-reset: rail;
  margin: 0;
  padding: 0;
}
.rail li { counter-increment: rail; }
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 2px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid #2f2f2f;
  transition: background-color .18s ease, color .18s ease, padding-left .18s ease;
}
.rail a::before {
  content: counter(rail, decimal-leading-zero);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}
.rail a:hover {
  background: var(--red);
  color: #fff;
  padding-left: 8px;
}
.rail a:hover::before { color: #fff; }

/* ---------- 页脚 ---------- */
footer {
  background: var(--ink);
  color: var(--yellow);
  border-top: 3px solid var(--red);
  padding: 44px 18px 30px;
  text-align: center;
}
.cta { margin: 0 0 22px; }
.cta a {
  display: inline-block;
  padding: 4px 12px;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--yellow);
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: 4px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.cta a:hover { background: var(--yellow); color: var(--ink); border-color: var(--red); }
footer small {
  display: block;
  font-size: 16px;
  letter-spacing: .05em;
  color: #b6b6b6;
}

/* ---------- 入场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 断点 ---------- */
@media (max-width: 1024px) {
  .nav { display: none; }
  .menu { display: block; }
}

@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .rail { position: static; }
  .rail ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 40px 18px 48px;
  }
  .hero-copy { order: 1; text-align: left; }
  .collage { order: 2; aspect-ratio: 4 / 3; min-height: 220px; }
  .shot-a { width: 64%; top: 0; }
  .shot-b { width: 54%; bottom: 0; }
  .badge { right: 0; top: -12px; font-size: 14px; }
  .search { order: 3; flex: 1 1 100%; margin-left: 0; }
  .search input { flex: 1 1 auto; width: auto; }
  .menu { order: 2; }
  main { padding: 32px 14px 56px; }
  .prose { padding: 20px 15px 28px; }
  .rail ol { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 2rem; }
  .brand { width: 44px; height: 44px; }
}

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