@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mist: #f3f3f3;
  --mute: #555555;
  --line: #dcdcdc;
  --u: 8px;
  --rail: 80px;
  --r: 10px;
}

*,
*::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: "Didact Gothic", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

body.lock {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: "Poiret One", "Didact Gothic", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.02em;
  margin: 0;
}

p {
  margin: 0 0 16px;
}

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

a {
  color: inherit;
}

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

small {
  display: block;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--mute);
}

small::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  background: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---- 左侧固定轨 ---- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  background: var(--paper);
  border-right: 1px solid var(--ink);
}

.brand {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  text-decoration: none;
}

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

.brand .glyph {
  font-family: "Poiret One", "PingFang SC", serif;
  font-size: 1.3rem;
  line-height: 1;
}

.nav {
  margin: 0;
}

.nav > summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.nav > summary::-webkit-details-marker {
  display: none;
}

.nav > summary .bars {
  position: relative;
  display: block;
  width: 20px;
  height: 12px;
}

.nav > summary .bars::before,
.nav > summary .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.nav > summary .bars::before {
  top: 0;
}

.nav > summary .bars::after {
  bottom: 0;
}

.nav[open] > summary {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 90;
}

.nav[open] > summary .bars::before {
  transform: translateY(5px) rotate(45deg);
}

.nav[open] > summary .bars::after {
  transform: translateY(-5px) rotate(-45deg);
}

.nav:not([open]) > .menu,
.nav:not([open]) > .search {
  display: none;
}

.nav > .menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 96px 32px 96px 112px;
  overflow: auto;
  background: var(--ink);
  color: var(--paper);
  counter-reset: navc;
}

.nav .menu li {
  counter-increment: navc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.nav .menu a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-height: 48px;
  padding: 12px 4px;
  color: var(--paper);
  text-decoration: none;
  font-family: "Poiret One", "Didact Gothic", "PingFang SC", sans-serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: 0.04em;
}

.nav .menu a::before {
  content: counter(navc, decimal-leading-zero);
  font-family: "Didact Gothic", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

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

.nav .menu li.is-hidden {
  display: none;
}

.nav > .search {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 85;
  width: min(320px, calc(100% - 32px));
}

.nav > .search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--paper);
  background: transparent;
  color: var(--paper);
  font-family: inherit;
  font-size: 16px;
}

.nav > .search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.nav > .search input:focus {
  background: var(--paper);
  color: var(--ink);
}

/* ---- 正文骨架 ---- */
main {
  padding-left: var(--rail);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--u);
  align-content: start;
  min-height: 100svh;
  padding: 64px 32px 32px;
}

.badge {
  position: absolute;
  left: 32px;
  top: 64px;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
}

.badge::before {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px dashed var(--ink);
  border-radius: 50%;
  animation: spin 24s linear infinite;
}

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

.hero-copy {
  grid-column: 7 / 13;
  text-align: right;
}

.hero-copy h1 {
  font-size: clamp(2rem, 6.2vw, 5rem);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.hero-copy p {
  max-width: 44ch;
  margin-left: auto;
  color: #333;
}

.hero-media {
  grid-column: 1 / 13;
  margin-top: 32px;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: var(--r);
  box-shadow: 0 28px 54px -34px rgba(0, 0, 0, 0.6);
  background: repeating-linear-gradient(45deg, var(--mist) 0 12px, #fff 12px 24px);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 48px;
  max-width: 1240px;
  padding: 0 32px 96px;
}

.wrap > section {
  min-width: 0;
}

article > section {
  margin-bottom: 20px;
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.55);
  scroll-margin-top: 32px;
}

article > section:last-child {
  margin-bottom: 0;
}

article h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 16px;
}

article h3 {
  font-size: 1.2rem;
  margin: 24px 0 8px;
}

article p {
  max-width: 68ch;
}

article ul,
article ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

article li {
  margin-bottom: 8px;
}

article a {
  text-underline-offset: 3px;
}

article time {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--mute);
}

article img {
  border-radius: var(--r);
  margin: 16px 0;
}

article blockquote {
  margin: 16px 0;
  padding-left: 16px;
  border-left: 2px solid var(--ink);
  color: var(--mute);
}

.side {
  align-self: start;
  position: sticky;
  top: 32px;
  padding-left: 24px;
  border-left: 1px solid var(--ink);
}

.side h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.side-menu {
  margin-top: 16px;
}

.side-menu a {
  display: block;
  min-height: 44px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.95rem;
}

.side-menu a:hover {
  padding-left: 6px;
  border-color: var(--ink);
}

/* ---- 页脚 ---- */
.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding: 64px 32px 0 calc(var(--rail) + 32px);
  background: var(--ink);
  color: var(--paper);
}

.foot section {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.foot small {
  color: rgba(255, 255, 255, 0.68);
}

.foot h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin-bottom: 20px;
}

.foot a {
  color: var(--paper);
}

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--paper);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.btn:hover,
.btn:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.foot-menu a {
  display: block;
  min-height: 44px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none;
  font-size: 0.95rem;
}

.foot-menu a:hover {
  border-color: var(--paper);
}

.foot-meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.foot-bar {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.foot-bar p {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- 断点 ---- */
@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .side {
    position: static;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }
}

@media (max-width: 760px) {
  :root {
    --rail: 0px;
  }

  .rail {
    inset: 0 0 auto 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .brand {
    width: 44px;
    height: 44px;
  }

  .nav[open] > summary {
    top: 8px;
    right: 12px;
  }

  .nav > .menu {
    padding: 84px 20px 92px;
  }

  .nav > .search {
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
  }

  main {
    padding-left: 0;
  }

  .hero {
    padding: 84px 20px 24px;
  }

  .badge {
    position: static;
    width: auto;
    height: auto;
    margin-bottom: 14px;
    border: 0;
    border-radius: 0;
    background: none;
    display: inline-block;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
  }

  .badge::before {
    display: none;
  }

  .hero-copy {
    grid-column: 1 / 13;
    text-align: left;
  }

  .hero-copy h1 {
    margin-bottom: 14px;
  }

  .hero-copy p {
    margin-left: 0;
  }

  .hero-media {
    aspect-ratio: 4 / 3;
    margin-top: 24px;
  }

  .wrap {
    padding: 0 20px 64px;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 48px 20px 0;
  }
}

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

  .badge::before {
    animation: none;
  }
}

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