:root {
  --ink: #000000;
  --paper: #ffffff;
  --rail: 208px;
  --strip: 34px;
  --muted: rgba(0, 0, 0, 0.62);
}

*,
*::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: "Nunito Sans", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

p {
  margin: 0 0 1.1em;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.14;
  letter-spacing: -0.018em;
  font-weight: 700;
}

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

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 顶部细条 ---------- */
.strip {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--strip);
  z-index: 70;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.strip p {
  margin: 0;
  padding: 0 1rem;
  font-size: 13px;
  letter-spacing: 0.24em;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* ---------- 左侧竖排导航轨 ---------- */
.rail {
  position: fixed;
  inset: var(--strip) auto 0 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.9rem 0 1.1rem;
  background: var(--paper);
  border-right: 1px solid var(--ink);
}

.brand {
  font-family: "Varela Round", "Nunito Sans", sans-serif;
  font-size: 17px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.4rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  width: calc(100% - 2rem);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.rail-list a {
  display: block;
  padding: 0.68rem 0.55rem;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

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

/* ---------- 汉堡遮罩 ---------- */
.drawer {
  flex: 0 0 auto;
}

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

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

.bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: background 0.2s ease;
}

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

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

.drawer-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  margin: 0;
  padding: 6.5rem clamp(1.4rem, 7vw, 5rem) 3rem;
  list-style: none;
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  align-content: center;
}

.drawer[open] > .drawer-menu {
  display: grid;
}

.drawer-menu a {
  display: block;
  padding: 0.6rem 0;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-family: "Varela Round", "Nunito Sans", sans-serif;
  font-size: clamp(1.2rem, 3.4vw, 2rem);
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

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

.drawer[open] > summary {
  position: fixed;
  top: calc(var(--strip) + 0.6rem);
  right: 1rem;
  z-index: 60;
  border-color: var(--paper);
  background: var(--ink);
}

.drawer[open] .bars {
  background: transparent;
}

.drawer[open] .bars::before,
.drawer[open] .bars::after {
  background: var(--paper);
  top: 0;
}

.drawer[open] .bars::before {
  transform: rotate(45deg);
}

.drawer[open] .bars::after {
  transform: rotate(-45deg);
}

/* ---------- 主体 ---------- */
.shell {
  margin-left: var(--rail);
  padding-top: var(--strip);
}

main,
.foot {
  max-width: 1180px;
  padding-inline: clamp(1.1rem, 4vw, 3.5rem);
  margin-inline: auto;
}

main > section {
  padding: clamp(2rem, 4vw, 3.4rem) 0;
  border-top: 1px solid var(--ink);
}

main > section[id] {
  scroll-margin-top: calc(var(--strip) + 1.25rem);
}

main > section > p,
main > section > ul,
main > section > ol,
main > section > blockquote,
main > section > table,
main > section > h3,
main > section > h4 {
  max-width: 66ch;
}

main > section > h2 {
  font-size: clamp(1.45rem, 2.7vw, 2.05rem);
  max-width: 24ch;
  margin-bottom: 0.5rem;
}

main > section > h2 + hr,
main > section > h3 + hr {
  margin: 0 0 1.5rem;
  max-width: 5.5rem;
}

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

main ul,
main ol {
  padding-left: 1.2rem;
}

main li {
  margin-bottom: 0.4em;
}

main blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--ink);
  font-style: normal;
  color: var(--muted);
}

main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

main th,
main td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  padding: 0.55rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

/* ---------- 首屏 ---------- */
.hero {
  border-top: 0 !important;
  padding: clamp(1.75rem, 5vw, 3.6rem) 0 0;
  min-height: 70vh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-content: start;
  background-image: radial-gradient(rgba(0, 0, 0, 0.17) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: 0 0;
}

.hero-copy {
  grid-column: 1 / 9;
}

.hero h1 {
  font-family: "Varela Round", "Nunito Sans", sans-serif;
  font-weight: 400;
  font-size: clamp(2.05rem, 6vw, 4.3rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.lede {
  max-width: 38ch;
  margin: 0 0 1.6rem;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-aside {
  grid-column: 10 / 13;
  align-self: start;
  border: 1px solid var(--ink);
  padding: 0.95rem 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.hero-aside h2 {
  font-size: 16px;
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
}

.hero-aside hr {
  margin: 0 0 0.5rem;
  max-width: 3.5rem;
}

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

.aside-list a {
  display: block;
  padding: 0.45rem 0;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
}

.aside-list a:hover {
  text-decoration: underline;
}

.hero-fig {
  grid-column: 1 / 13;
  margin: 1.4rem 0 0;
  background: var(--ink);
  overflow: hidden;
}

.hero-fig:empty {
  min-height: 32vh;
}

.hero-fig img,
.end-fig img {
  width: 100%;
  height: clamp(180px, 34vh, 400px);
  object-fit: cover;
}

.end {
  border-top: 1px solid var(--ink);
}

.end-fig {
  margin: 0;
  background: var(--ink);
  overflow: hidden;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 2rem;
  border-top: 1px solid var(--ink);
  padding-bottom: 1.5rem;
}

.foot-cta {
  padding: clamp(1.4rem, 4vw, 3rem) 0;
}

.foot-cta a {
  display: inline-block;
  font-family: "Varela Round", "Nunito Sans", sans-serif;
  font-size: clamp(2.1rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
  padding: 0.1em 0;
}

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

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

.foot-base address {
  font-style: normal;
  font-size: 16px;
  color: var(--muted);
}

.foot-base ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.2rem;
}

.foot-base a {
  display: inline-block;
  padding: 0.6rem 0;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-base a:hover {
  border-bottom-color: var(--ink);
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes riseIn {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(9px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes drift {
    from {
      transform: scale(1.02) translateY(0);
    }
    to {
      transform: scale(1.07) translateY(-12px);
    }
  }

  .hero-copy > * {
    animation: riseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-copy > *:nth-child(2) {
    animation-delay: 0.1s;
  }

  .hero-aside {
    animation: riseIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s both;
  }

  .aside-list li {
    animation: slideIn 0.5s ease both;
  }

  .aside-list li:nth-child(1) { animation-delay: 0.28s; }
  .aside-list li:nth-child(2) { animation-delay: 0.34s; }
  .aside-list li:nth-child(3) { animation-delay: 0.4s; }
  .aside-list li:nth-child(4) { animation-delay: 0.46s; }
  .aside-list li:nth-child(5) { animation-delay: 0.52s; }
  .aside-list li:nth-child(6) { animation-delay: 0.58s; }
  .aside-list li:nth-child(7) { animation-delay: 0.64s; }

  .hero-fig img {
    animation: drift 20s ease-in-out infinite alternate;
  }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 880px) {
  .rail {
    inset: var(--strip) 0 auto 0;
    width: 100%;
    height: 56px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.85rem;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .rail-list {
    display: none;
  }

  .brand {
    width: auto;
    font-size: 16px;
    padding: 0.4rem 0;
    border: 0;
    text-align: left;
  }

  .shell {
    margin-left: 0;
  }

  .hero {
    min-height: 0;
  }

  .hero-copy,
  .hero-aside,
  .hero-fig {
    grid-column: 1 / 13;
  }

  .hero-aside {
    margin-top: 0.4rem;
  }

  .drawer-menu {
    grid-template-columns: 1fr;
    padding-top: 6rem;
    align-content: start;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .strip p {
    font-size: 12px;
    letter-spacing: 0.18em;
  }
}

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

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