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

:root {
  --bg: #111111;
  --ink: #F2E9DC;
  --red: #E23A20;
  --soft: #cfc6b9;
  --dim: #9d9488;
  --line: rgba(242, 233, 220, .2);
  --pad: clamp(18px, 4.2vw, 56px);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
menu { margin: 0; padding: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 30;
  padding: 12px 18px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.skip:focus { left: 10px; top: 10px; }

/* 页头两行 */
.masthead {
  display: grid;
  gap: 12px;
  padding: 16px var(--pad) 18px;
  border-bottom: 3px solid var(--red);
  background: var(--bg);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-size: clamp(19px, 3.4vw, 27px);
  font-weight: 800;
  letter-spacing: .04em;
}
.brand .logo { height: 34px; width: auto; }
.brand:hover { color: var(--red); }

.mark {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 16px;
  letter-spacing: .16em;
  color: var(--red);
}

.navwrap > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid var(--red);
  border-radius: 999px;
  color: var(--red);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .16em;
  user-select: none;
  transition: background .18s ease, color .18s ease;
}
.navwrap > summary::-webkit-details-marker { display: none; }
.navwrap > summary::after {
  content: "";
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: currentColor;
  margin-top: 5px;
}
.navwrap > summary:hover,
.navwrap[open] > summary { background: var(--red); color: #fff; }

.navpill {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  list-style: none;
}
.navpill a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #191919;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.navpill li:first-child a { background: var(--red); border-color: var(--red); color: #fff; }
.navpill a:hover,
.navpill a:focus-visible { background: var(--ink); border-color: var(--ink); color: #111; }

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  min-height: 100vh;
  padding: clamp(30px, 7vh, 80px) var(--pad);
  border-bottom: 3px solid var(--red);
  overflow: hidden;
}

.hero-media {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border: 4px solid var(--ink);
  background: #1b1b1b;
  overflow: hidden;
}
.hero-media.is-blank {
  background-image: repeating-linear-gradient(45deg, #1b1b1b 0 14px, #141414 14px 28px);
}
.hero-img { width: 100%; height: 100%; object-fit: cover; }

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  justify-items: end;
  text-align: right;
}

.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 16px;
  letter-spacing: .18em;
  color: var(--red);
}

.hero h1 {
  font-size: clamp(42px, 8.6vw, 112px);
  line-height: .9;
  letter-spacing: -.03em;
  font-weight: 800;
  text-wrap: balance;
}

.hero-desc {
  max-width: 34ch;
  color: var(--soft);
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 26px;
  border: 3px solid var(--red);
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: background .18s ease, color .18s ease;
}
.cta:hover { background: transparent; color: var(--red); }

.ghost {
  position: absolute;
  left: -1vw;
  bottom: -1.5vh;
  z-index: 0;
  font-size: clamp(70px, 17vw, 240px);
  line-height: .8;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ink);
  opacity: .07;
  white-space: nowrap;
  pointer-events: none;
}

/* 主体：左栏 + 正文 */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: clamp(24px, 4.5vw, 60px);
  padding: clamp(30px, 5vw, 72px) var(--pad) clamp(50px, 7vw, 92px);
}

.rail {
  position: sticky;
  top: 20px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 5px solid var(--red);
}

.rail-t {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--red);
}
.rail-t span { display: inline-flex; align-items: center; gap: 8px; }
.rail-t a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}
.rail-t a:hover { text-decoration: underline; }

.tick {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--red);
  flex: none;
}

.dotlist {
  list-style: none;
  border-top: 1px solid var(--line);
}
.dotlist li { border-bottom: 1px solid var(--line); }
.dotlist a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: color .16s ease;
}
.dotlist a::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--red);
  flex: none;
}
.dotlist a:hover { color: var(--red); }

.body { min-width: 0; }

.prose { max-width: 74ch; overflow-wrap: break-word; }

.prose > article {
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.prose > article:first-child { border-top: 0; padding-top: 0; }

.prose h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 4px solid var(--red);
  text-wrap: balance;
}
.prose h3 {
  font-size: clamp(21px, 2.6vw, 27px);
  margin: 26px 0 12px;
  text-wrap: balance;
}
.prose h2 + p, .prose h3 + p { margin-top: 0; }

.prose p { margin: 0 0 18px; line-height: 1.8; }
.prose strong { color: #fff; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--red); text-decoration: none; border-bottom: 1px solid currentColor; }
.prose a:hover { color: var(--ink); }
.prose img { margin: 20px 0; border: 3px solid var(--line); }
.prose figure { margin: 0 0 20px; }
.prose figcaption { font-size: 16px; color: var(--dim); padding-top: 8px; }
.prose blockquote {
  margin: 0 0 20px;
  padding: 14px 20px;
  border-left: 6px solid var(--red);
  background: #191919;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 16px;
  background: #1e1e1e;
  padding: 2px 6px;
}
.prose pre {
  margin: 0 0 20px;
  padding: 16px;
  background: #1a1a1a;
  border-left: 6px solid var(--red);
  overflow-x: auto;
}
.prose table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: #1c1c1c; color: #fff; }
.prose hr { border: 0; border-top: 3px solid var(--line); margin: 26px 0; }

/* 页脚四栏 */
.foot {
  border-top: 3px solid var(--red);
  background: #0b0b0b;
  padding: clamp(32px, 5vw, 64px) var(--pad) 26px;
}

.fgrid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.ftitle {
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.15;
  text-wrap: balance;
}
.ftitle span { display: inline-flex; align-items: flex-start; gap: 8px; }
.ftitle .tick { margin-top: 7px; }

.foot dl { margin: 0; }
.foot dt {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--red);
  margin-bottom: 4px;
}
.foot dd { margin: 0; }
.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--soft);
  text-decoration: none;
  transition: color .16s ease;
}
.foot dd a:hover { color: var(--red); }

.fbottom {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  margin-top: clamp(24px, 4vw, 42px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--dim);
}

/* 动效 */
.js .stagger { opacity: 0; transform: translateY(14px); }
.js .stagger.in {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .5s ease;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: clamp(20px, 5vw, 34px) var(--pad) clamp(28px, 6vw, 42px);
  }
  .hero-copy { order: 1; }
  .hero-media { order: 2; aspect-ratio: 16 / 11; }
  .ghost {
    position: static;
    order: 3;
    opacity: .12;
    white-space: normal;
    line-height: .95;
    text-align: right;
    font-size: clamp(44px, 13vw, 96px);
  }
  .wrap { grid-template-columns: 1fr; }
  .body { order: 1; }
  .rail { order: 2; position: static; border-top-width: 4px; }
  .fgrid { grid-template-columns: 1fr 1fr; }
  .fbrand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .fgrid { grid-template-columns: 1fr; }
  .fbrand { grid-column: auto; }
  .hero h1 { font-size: clamp(38px, 11.5vw, 56px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .stagger { opacity: 1; transform: none; transition: none; }
}

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