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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #4a4a4a;
  --rail: 64px;
  --hair: rgba(0, 0, 0, 0.14);
}

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

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

body {
  margin: 0;
  padding-left: var(--rail);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: 'Lora', Georgia, 'Songti SC', serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.16;
  margin: 0;
}

a {
  color: inherit;
}

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

/* ---------- 左侧竖排导轨 ---------- */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.4rem;
  background: var(--paper);
  border-right: 1px solid var(--ink);
}

.rail__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
}

.mark {
  display: block;
  width: 15px;
  height: 15px;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.rail__brand:hover .mark,
.foot__logo:hover .mark {
  transform: rotate(45deg);
}

.rail__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.rail__contact {
  writing-mode: vertical-rl;
  text-decoration: none;
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  padding: 0.7rem 0;
  min-height: 44px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

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

.rail__btn {
  width: 44px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.22s ease;
}

.rail__btn[aria-expanded='true'] .bar:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}

.rail__btn[aria-expanded='true'] .bar:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

.rail__btn-t {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  margin-top: 0.3rem;
}

/* ---------- 全屏遮罩菜单 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  overflow-y: auto;
  padding: 4rem clamp(1.25rem, 7vw, 4.5rem) 3rem calc(var(--rail) + clamp(1.25rem, 7vw, 4.5rem));
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.38s;
}

.overlay[data-open='true'] {
  transform: none;
  visibility: visible;
}

.o-nav {
  width: 100%;
  max-width: 780px;
}

.o-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: o;
}

.o-list li {
  counter-increment: o;
  opacity: 0;
  transform: translateY(14px);
}

.overlay[data-open='true'] .o-list li {
  animation: rise 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 90ms);
}

.o-list a {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 52px;
  padding: 0.5rem 0;
  color: var(--paper);
  text-decoration: none;
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.3rem, 4.2vw, 2.35rem);
  line-height: 1.2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  transition: padding-left 0.24s ease, border-color 0.24s ease;
}

.o-list a::before {
  content: counter(o, decimal-leading-zero);
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  opacity: 0.62;
}

.o-list a:hover {
  padding-left: 0.9rem;
  border-bottom-color: var(--paper);
}

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

/* ---------- 主区 ---------- */

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(2.5rem, 9vh, 6rem) 0 0;
}

.hero__h1 {
  font-size: clamp(2.1rem, 6.4vw, 4.5rem);
  line-height: 1.04;
  max-width: 20ch;
}

.hero__desc {
  max-width: 54ch;
  margin: 1.1rem 0 0;
  color: var(--mute);
  font-size: 1.0625rem;
}

.hero__fig {
  margin: 0;
}

.hero__fig img,
.hero__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.hero__band {
  height: clamp(40px, 7vh, 74px);
  background: var(--ink);
  clip-path: polygon(0 62%, 100% 0, 100% 100%, 0 100%);
  will-change: transform;
}

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

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(2.5rem, 6vh, 4.5rem) 0;
}

.prose {
  min-width: 0;
}

.prose > article,
.prose > section,
.prose > div {
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: clamp(1.15rem, 3vw, 2rem);
  margin: 0 0 1.75rem;
  background: var(--paper);
  scroll-margin-top: 1.5rem;
}

.js .prose > article {
  opacity: 0;
  transform: translateY(16px);
}

.js .prose > article.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.prose h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.95rem);
  margin: 0 0 0.5rem;
}

.prose h3 {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  margin: 1.4rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0 0 1.15rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

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

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  margin: 1.15rem 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
}

.prose a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.prose a:hover {
  background: var(--ink);
  color: var(--paper);
}

.prose img {
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  margin: 1rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border: 1px solid var(--ink);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

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

.side {
  position: sticky;
  top: 2rem;
  border-left: 1px solid var(--ink);
  padding-left: 1.1rem;
}

.side__h {
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  margin: 0 0 0.55rem;
}

.side hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0 0 0.6rem;
}

.side__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.side__list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.4rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  line-height: 1.4;
}

.side__list a:hover {
  border-bottom-color: var(--ink);
  padding-left: 0.3rem;
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 2rem;
  border-top: 1px solid var(--ink);
  padding: 1.35rem clamp(1rem, 4vw, 2.5rem);
}

.foot__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.foot__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  text-decoration: none;
}

.foot__logo .mark {
  width: 12px;
  height: 12px;
}

.foot__name {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.foot__nav {
  flex: 1 1 240px;
}

.f-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
}

.f-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.15rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.f-list a:hover {
  border-bottom-color: var(--ink);
}

.foot__legal {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--mute);
}

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

@media (max-width: 920px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 620px) {
  :root {
    --rail: 56px;
  }

  body {
    font-size: 16px;
  }

  .hero {
    min-height: auto;
    padding-top: 2.75rem;
  }

  .hero__h1 {
    max-width: 100%;
  }

  .hero__desc {
    font-size: 1rem;
  }

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

  .foot__nav {
    flex: 0 0 auto;
    width: 100%;
  }

  .f-list {
    gap: 0.1rem 0.85rem;
  }
}

@media (min-width: 1400px) {
  :root {
    --rail: 76px;
  }
}

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

  .js .prose > article {
    opacity: 1;
    transform: none;
  }

  .overlay[data-open='true'] .o-list li {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .o-list a,
  .mark,
  .bar {
    transition: none;
  }
}

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