@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

:root {
  --ink: #000000;
  --bg: #ffffff;
  --line: #000000;
  --r: 18px;
  --u: 8px;
  --pad: clamp(16px, 4vw, 44px);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Public Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.005em;
}

h1,
h2,
h3,
h4,
.brand,
address {
  font-family: 'Lexend Mega', 'Public Sans', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

a {
  color: var(--ink);
}

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

/* 顶部 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-block;
  padding: 6px 0;
  font-size: clamp(19px, 2.6vw, 27px);
  line-height: 1.1;
  text-decoration: none;
}

.bmark {
  width: 14px;
  height: 14px;
  background: var(--ink);
  flex: 0 0 auto;
}

.menu {
  overflow-x: auto;
  scrollbar-width: none;
}

.menu::-webkit-scrollbar {
  display: none;
}

.menu ul {
  display: flex;
  min-width: max-content;
  margin: 0;
  padding: 0 var(--pad) 0 calc(var(--pad) - 12px);
  list-style: none;
}

.menu a {
  display: block;
  padding: 13px 12px;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.menu a:hover,
.menu a:focus-visible {
  border-bottom-color: var(--ink);
  background: #f2f2f2;
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-content: start;
  min-height: 100svh;
  padding: clamp(24px, 5vw, 64px) var(--pad) 0;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
}

.ghost {
  position: absolute;
  right: -0.06em;
  bottom: -0.16em;
  z-index: 0;
  max-width: 100%;
  font-family: 'Lexend Mega', 'PingFang SC', sans-serif;
  font-weight: 900;
  font-size: clamp(72px, 20vw, 250px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

.lede {
  position: relative;
  z-index: 1;
  grid-column: 4 / -1;
  grid-row: 1;
  text-align: right;
  padding-top: clamp(8px, 4vw, 48px);
}

.lede h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6.2vw, 78px);
  line-height: 1.04;
}

.sub {
  margin: 0 0 0 auto;
  max-width: 44ch;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
}

.rail {
  position: relative;
  z-index: 1;
  grid-column: 1 / 4;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 120px;
  padding-right: 4px;
}

.rail small,
main small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.rail small {
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.rail h2 {
  margin: 4px 0 12px;
  font-size: 15px;
  letter-spacing: 0.12em;
}

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

.rail li {
  border-top: 1px solid var(--line);
}

.rail a {
  display: block;
  padding: 11px 0;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: padding-left 0.18s ease;
}

.rail a:hover,
.rail a:focus-visible {
  padding-left: 8px;
  text-decoration: underline;
}

.hero-media {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  margin: clamp(22px, 4vw, 46px) 0 0;
  border-top: 2px solid var(--line);
  overflow: hidden;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-media.is-empty {
  min-height: 180px;
  background-image: repeating-linear-gradient(45deg, #000 0 1px, transparent 1px 12px);
}

/* 正文 */
main > div:not(.hero) {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px 16px;
  padding: clamp(48px, 7vw, 100px) var(--pad);
  border-bottom: 1px solid var(--line);
  counter-increment: sec;
  scroll-margin-top: 128px;
}

main {
  counter-reset: sec;
}

main > div:not(.hero)::before {
  content: counter(sec, decimal-leading-zero);
  grid-column: 1 / -1;
  font-family: 'Lexend Mega', 'Public Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}

main > div:not(.hero) > * {
  grid-column: 2 / 12;
  min-width: 0;
}

main > div:not(.hero) > h2,
main > div:not(.hero) > h3,
main > div:not(.hero) > h4,
main > div:not(.hero) > figure,
main > div:not(.hero) > table,
main > div:not(.hero) > pre,
main > div:not(.hero) > blockquote,
main > div:not(.hero) > section {
  grid-column: 1 / -1;
}

main h2 {
  margin: 0 0 0.4em;
  font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.12;
}

main h2 + small,
main small + h2 {
  margin-bottom: 0.5em;
}

main h3 {
  margin: 1.7em 0 0.4em;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.25;
}

main h4 {
  margin: 1.4em 0 0.3em;
  font-size: 18px;
}

main p {
  margin: 0 0 1.1em;
  max-width: 68ch;
}

main ul,
main ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  max-width: 66ch;
}

main li {
  margin: 0.35em 0;
}

main li::marker {
  font-weight: 700;
}

main img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

main figure {
  margin: 1.6em 0;
}

main figcaption {
  margin-top: 8px;
  font-size: 14px;
  letter-spacing: 0.06em;
}

main blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  font-weight: 600;
  max-width: 62ch;
}

main blockquote p:last-child {
  margin-bottom: 0;
}

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

main th,
main td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

main th {
  font-weight: 700;
}

main hr {
  width: 100%;
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

main a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

main strong {
  font-weight: 700;
}

/* 页脚 */
footer {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(32px, 5vw, 64px) var(--pad) 0;
}

footer a {
  color: var(--bg);
}

.f-top {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.f-brand {
  grid-column: 1 / 7;
}

.f-brand address {
  font-style: normal;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.1;
}

.f-brand p {
  margin: 14px 0 0;
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.82;
}

.f-links {
  grid-column: 8 / -1;
}

.f-links ul,
.f-base ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.f-links ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.f-links a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  transition: opacity 0.18s ease, padding-left 0.18s ease;
}

.f-links a:hover,
.f-links a:focus-visible {
  padding-left: 6px;
  opacity: 0.7;
}

.f-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: clamp(26px, 4vw, 44px) 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
}

.f-sub label {
  font-size: 14px;
  letter-spacing: 0.18em;
}

.f-sub input {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--bg);
  background: var(--ink);
  border: 2px solid var(--bg);
  border-radius: 12px;
}

.f-sub input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.f-sub button {
  min-height: 48px;
  padding: 0 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--bg);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.f-sub button:hover {
  transform: translateY(-2px);
}

.f-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 24px;
  padding: 14px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  font-size: 14px;
}

.f-base p {
  margin: 0;
}

.f-base ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.f-base a {
  display: block;
  padding: 9px 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.f-base a:hover,
.f-base a:focus-visible {
  border-bottom-color: var(--bg);
}

/* 进场 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu a,
  .rail a,
  .f-links a,
  .f-sub button {
    transition: none;
  }
}

/* 窄屏 */
@media (max-width: 900px) {
  .hero {
    min-height: 0;
    padding-top: 22px;
    padding-bottom: 0;
  }

  .lede {
    grid-column: 1 / -1;
    grid-row: auto;
    text-align: left;
    padding-top: 0;
  }

  .sub {
    margin-left: 0;
  }

  .rail {
    grid-column: 1 / -1;
    grid-row: auto;
    position: static;
    padding: 0 0 10px;
  }

  .rail ul {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .rail li {
    border-top: 0;
    flex: 0 0 auto;
  }

  .rail a {
    padding: 10px 0;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .ghost {
    font-size: clamp(60px, 22vw, 140px);
    opacity: 0.12;
  }

  main > div:not(.hero) {
    padding: 44px var(--pad);
    scroll-margin-top: 112px;
  }

  main > div:not(.hero) > * {
    grid-column: 1 / -1;
  }

  .f-brand,
  .f-links {
    grid-column: 1 / -1;
  }

  .f-links ul {
    grid-template-columns: 1fr;
  }

  .f-base {
    justify-content: flex-start;
  }
}

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