:root {
  --ink: #000000;
  --paper: #ffffff;
  --ash: #f2f2f2;
  --line: #000000;
  --font-body: 'DM Sans', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-head: 'Space Grotesk', 'DM Sans', Helvetica, Arial, 'PingFang SC', sans-serif;
}

*,
*::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: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
}

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

.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;
}

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ---------- 页头 ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-decoration: none;
  padding: 0.4rem 0;
  display: inline-block;
}

.finder,
.signup {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
  flex: 1 1 15rem;
  max-width: 22rem;
}

.finder input,
.signup input {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  width: 100%;
  min-width: 0;
}

.finder button,
.signup button {
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.04em;
  padding: 0 1.1rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.finder button:hover,
.signup button:hover {
  background: var(--paper);
  color: var(--ink);
}

.primary ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary li {
  border-right: 1px solid var(--line);
}

.primary li:first-child {
  border-left: 1px solid var(--line);
}

.primary a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0.6rem 1rem;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.primary a:hover,
.primary a[aria-current] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 主体网格 ---------- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  column-gap: 3rem;
  padding: 2rem 0 3rem;
  counter-reset: sec;
}

.stage > section {
  grid-column: 1;
  position: relative;
  counter-increment: sec;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
}

.stage > section::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 2.9rem;
  left: -2rem;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stage > section:last-of-type {
  border-bottom: 0;
}

.stage h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 0.8rem;
}

.stage h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 1.8rem 0 0.5rem;
}

.stage p {
  max-width: 66ch;
}

.stage ul,
.stage ol {
  padding-left: 1.15rem;
  max-width: 66ch;
}

.stage li {
  margin: 0.35rem 0;
}

.stage a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.stage > section > article {
  background: var(--ash);
  border-radius: 4px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}

.stage > section > article p:last-child,
.stage > section > article ul:last-child {
  margin-bottom: 0;
}

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

.hero {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2rem;
  align-items: end;
  min-height: 42vh;
  padding-top: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-art {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--ash);
  aspect-ratio: 4 / 3;
  max-height: 320px;
}

.dot-field {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.32) 1px, transparent 1px);
  background-size: 10px 10px;
}

.hero-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform;
}

.hero-copy {
  text-align: right;
  padding-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.95rem, 4.6vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.hero-line {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 0 auto;
  max-width: 48ch;
}

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

.rail {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 1.5rem;
  border-left: 1px solid var(--line);
  padding: 0.25rem 0 0.5rem 1.25rem;
}

.rail-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0 0 0.35rem;
}

.subtitle {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
  word-break: break-word;
}

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

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

.rail-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.rail-list a {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-height: 40px;
  padding: 0.55rem 0;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.16s ease;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--font-head);
  font-size: 16px;
  flex: 0 0 auto;
}

.rail-list a:hover {
  transform: translateX(3px);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.foot {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 1.4rem;
  margin-top: 1rem;
}

.foot-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: end;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.foot-lead .subtitle {
  margin-bottom: 0;
}

.foot-h {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.45rem;
}

.signup {
  max-width: none;
  justify-self: end;
  width: 100%;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 2rem 0 1.5rem;
}

.foot-cols dl {
  margin: 0;
  min-width: 0;
}

.foot-cols dt {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  padding-top: 0.6rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid var(--line);
}

.foot-cols dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  word-break: break-word;
}

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

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

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

.foot-base {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.foot-base p {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
}

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

@media (max-width: 1080px) {
  .stage > section::before {
    display: none;
  }
}

@media (max-width: 940px) {
  .shell {
    padding: 0 1.25rem;
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    padding-top: 1.25rem;
  }

  .stage > section,
  .rail {
    grid-column: 1;
  }

  .rail {
    grid-row: auto;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 1.5rem 0 0;
    margin-top: 1.5rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    min-height: 0;
    padding-bottom: 1.5rem;
  }

  .hero-art {
    aspect-ratio: 16 / 9;
    max-height: 190px;
  }

  .hero-copy {
    text-align: left;
    padding-bottom: 0;
  }

  .hero-line {
    margin-left: 0;
  }

  .brandrow {
    padding: 1rem 0;
    gap: 1rem;
  }

  .finder {
    max-width: none;
  }

  .foot-top {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
  }

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .stage > section {
    padding: 2rem 0;
  }
}

@media (max-width: 420px) {
  .primary a {
    padding: 0.6rem 0.7rem;
    font-size: 16px;
  }

  .primary li:first-child {
    border-left: 0;
  }

  .primary li:last-child {
    border-right: 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .hero-img {
    transform: none !important;
  }
}

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