:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --ink: #1a1a1a;
  --ink-soft: #403c36;
  --mute: #6f6a61;
  --line: #e2ded6;
  --line-strong: #c9c4ba;
  --radius: 28px;
  --measure: 1120px;
}

*,
*::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: "Work Sans", "Outfit", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

.wrap {
  width: min(var(--measure), 100% - 40px);
  margin-inline: auto;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  background: var(--paper-2);
}

p {
  margin: 0 0 1.1rem;
}

h1,
h2,
h3,
h4 {
  font-family: "Outfit", "Work Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin: 0;
}

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

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

svg {
  display: block;
}

/* ---------- 页头：品牌一行，菜单一行 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 0;
  min-height: 44px;
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.brand .mark {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  object-fit: contain;
}

.brandname {
  border-bottom: 1px solid var(--ink);
}

.menubox {
  padding-block: 8px 10px;
}

.menubox summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
  user-select: none;
}

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

.menubox summary:hover {
  background: var(--paper-2);
}

.menubox[open] .caret {
  transform: rotate(180deg);
}

.navlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 8px;
  padding-block: 10px 4px;
}

.navlist a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 10px;
  text-decoration: none;
  border-top: 1px dotted var(--line-strong);
  font-size: 0.95rem;
}

.navlist .ico {
  flex: 0 0 auto;
  color: var(--mute);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  width: min(var(--measure), 100% - 40px);
  margin-inline: auto;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding-block: clamp(28px, 5vw, 60px) clamp(24px, 5vw, 52px);
  border-bottom: 1px solid var(--line);
}

.hero-num {
  position: absolute;
  left: 0;
  top: 0.06em;
  margin: 0;
  z-index: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(112px, 29vw, 300px);
  line-height: 0.8;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1.5px #e3dfd7;
  pointer-events: none;
  will-change: transform;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: right;
  margin-top: auto;
}

.hero h1 {
  font-size: clamp(1.9rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 0.8rem;
}

.lead {
  margin: 0 0 0 auto;
  max-width: 54ch;
  font-size: clamp(0.98rem, 1.5vw, 1.06rem);
  line-height: 1.65;
  color: var(--ink-soft);
  text-align: right;
}

.hero-fig {
  position: relative;
  z-index: 1;
  margin: 0;
}

.hero-fig img {
  display: block;
  width: 100%;
  max-height: 46vh;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

/* ---------- 正文：左栏 + 内容 ---------- */

.sheet {
  counter-reset: sec;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0 clamp(24px, 4vw, 56px);
  align-items: start;
  width: min(var(--measure), 100% - 40px);
  margin-inline: auto;
  padding-block: 8px 72px;
}

.rail {
  grid-column: 1;
  position: sticky;
  top: 118px;
  padding-top: 34px;
}

.rail small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--mute);
  margin-bottom: 6px;
}

.rail h2 {
  font-size: 1.06rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  margin-bottom: 12px;
}

.raillist {
  counter-reset: rl;
}

.raillist li {
  counter-increment: rl;
}

.raillist a {
  display: block;
  min-height: 40px;
  padding: 9px 0;
  font-size: 0.89rem;
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: none;
  border-top: 1px solid var(--line);
}

.raillist a::before {
  content: counter(rl, decimal-leading-zero);
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  color: var(--mute);
  margin-right: 0.7em;
  letter-spacing: 0.04em;
}

.sheet > section {
  grid-column: 2;
  position: relative;
  counter-increment: sec;
  padding-block: 56px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 124px;
}

.sheet > section:first-of-type {
  border-top: 0;
  padding-top: 40px;
}

.sheet > section::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  right: 0;
  top: 26px;
  z-index: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(60px, 10vw, 132px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.2px #e6e2da;
  pointer-events: none;
}

@supports not (-webkit-text-stroke: 1px black) {
  .hero-num,
  .sheet > section::before {
    color: #eae5dc;
  }
}

.sheet > section > *:first-child {
  margin-top: 0;
}

.sheet h2 {
  font-size: clamp(1.45rem, 3.1vw, 2rem);
  margin-bottom: 0.75rem;
  padding-right: 88px;
}

.sheet h3 {
  font-size: clamp(1.12rem, 2.1vw, 1.32rem);
  margin: 1.9rem 0 0.6rem;
}

.sheet small {
  display: block;
  font-size: 0.73rem;
  letter-spacing: 0.19em;
  color: var(--mute);
  margin-bottom: 0.45rem;
}

.sheet small + h2,
.sheet small + h3 {
  margin-top: 0;
}

.sheet ul,
.sheet ol {
  margin: 0 0 1.2rem;
  padding-left: 1.25rem;
}

.sheet li {
  margin-bottom: 0.5rem;
}

.sheet blockquote {
  margin: 1.6rem 0;
  padding: 0.9rem 1.3rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}

.sheet blockquote > *:last-child {
  margin-bottom: 0;
}

.sheet table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.94rem;
}

.sheet th,
.sheet td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  text-align: left;
  white-space: normal;
}

.sheet th {
  background: var(--paper-2);
  font-weight: 600;
}

.sheet img {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  margin: 1.2rem 0;
}

.sheet code,
.sheet pre {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 0.9rem;
}

.sheet pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.sheet figure {
  margin: 1.4rem 0;
}

.sheet figcaption {
  font-size: 0.82rem;
  color: var(--mute);
  margin-top: 0.4rem;
}

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

.foot {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.foot > section {
  width: min(var(--measure), 100% - 40px);
  margin-inline: auto;
}

.foot-mark {
  padding-block: 40px 8px;
  overflow: hidden;
}

.megamark {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 13vw, 7.6rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  word-break: break-all;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  border-top: 1px solid var(--line-strong);
  padding-block: 12px 22px;
  font-size: 0.85rem;
  color: var(--mute);
}

.copy {
  margin: 0;
  letter-spacing: 0.04em;
}

.footmenu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  font-size: 0.85rem;
}

.footmenu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink-soft);
  text-decoration: none;
}

.footmenu a:hover {
  text-decoration: underline;
  background: none;
}

/* ---------- 动效：锐利、无过渡 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .sheet > div {
    animation: sharp 260ms steps(4, end) both;
  }

  .sheet > div:nth-of-type(1) { animation-delay: 0ms; }
  .sheet > div:nth-of-type(2) { animation-delay: 40ms; }
  .sheet > div:nth-of-type(3) { animation-delay: 80ms; }
  .sheet > div:nth-of-type(4) { animation-delay: 120ms; }
  .sheet > div:nth-of-type(5) { animation-delay: 160ms; }
  .sheet > div:nth-of-type(6) { animation-delay: 200ms; }
  .sheet > div:nth-of-type(7) { animation-delay: 240ms; }
}

@keyframes sharp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .sheet > div {
    animation: none;
  }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 860px) {
  .sheet {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 48px;
  }

  .rail {
    grid-column: 1;
    position: static;
    padding: 28px 0 4px;
    border-bottom: 1px solid var(--line);
  }

  .raillist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 18px;
  }

  .raillist li {
    flex: 0 1 auto;
  }

  .raillist a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.85rem;
  }

  .raillist a::before {
    margin-right: 0.5em;
  }

  .sheet > div,
  .sheet > div:first-of-type {
    grid-column: 1;
    padding-block: 44px;
    border-top: 1px solid var(--line);
    scroll-margin-top: 108px;
  }

  .sheet h2 {
    padding-right: 64px;
  }

  .sheet > div::before {
    font-size: clamp(48px, 16vw, 92px);
    top: 20px;
  }

  .hero {
    min-height: 92svh;
  }

  .hero-inner {
    margin-top: 64px;
  }

  .hero-fig img {
    max-height: 38vh;
  }

  .brandrow {
    padding-block: 8px;
  }

  .navlist {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-mark {
    padding-top: 32px;
  }
}

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

  .wrap,
  .hero,
  .sheet,
  .foot > div {
    width: calc(100% - 32px);
  }
}

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