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

:root {
  --paper: #fdfbf7;
  --wash: #f5f5f5;
  --ink: #1a1a1a;
  --line: #e0ded9;
  --mute: #767676;
  --sans: Rubik, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --head: Outfit, Rubik, "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-bottom: 132px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

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

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

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 52px;
  min-height: 70vh;
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 24px 32px;
  position: relative;
  z-index: 1;
}

.hero-media {
  align-self: stretch;
  min-height: 260px;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  background: var(--wash);
}

.hero-swatch {
  height: 100%;
  min-height: 260px;
  border-radius: 18px;
  background: #ecebe7;
}

.hero-copy {
  text-align: right;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(2rem, 5.1vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero-desc {
  margin: 0 0 0 auto;
  max-width: 34ch;
  color: #4b4b4b;
  font-size: 17px;
}

/* 主体 */
main {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  align-items: start;
  gap: 56px;
  max-width: 1160px;
  margin: 52px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.side {
  position: sticky;
  top: 24px;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.side small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--mute);
}

.side h2 {
  margin: 5px 0 14px;
  font-family: var(--head);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

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

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

.side-list li:last-child {
  border-bottom: 0;
}

.side-list a {
  display: block;
  padding: 9px 0;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
}

.side-list a::before {
  counter-increment: side;
  content: counter(side, decimal-leading-zero);
  margin-right: 8px;
  font-size: 12px;
  color: #9d9a93;
  letter-spacing: 0.06em;
}

.side-list a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.body {
  min-width: 0;
}

.body > article {
  margin-bottom: 16px;
  padding: 30px 28px;
  border-radius: 18px;
  background: var(--wash);
  scroll-margin-top: 20px;
}

.body > article > :first-child {
  margin-top: 0;
}

.body > article > :last-child {
  margin-bottom: 0;
}

.body small {
  display: block;
  margin-top: 26px;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--mute);
}

.body p {
  margin: 0 0 1.05em;
  max-width: 68ch;
}

.body h2 {
  margin: 26px 0 14px;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.7vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
}

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

.body h3 {
  margin: 1.5em 0 0.55em;
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.35;
}

.body ul,
.body ol {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
  max-width: 66ch;
}

.body li {
  margin-bottom: 0.45em;
}

.body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.body a:hover {
  background: #e8e6e1;
}

.body blockquote {
  margin: 1.3em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--ink);
  color: #3c3c3c;
}

.body figure {
  margin: 1.3em 0;
}

.body img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96em;
  margin: 0 0 1.2em;
}

.body th,
.body td {
  padding: 9px 8px;
  border-bottom: 1px solid #e3e1dc;
  text-align: left;
  vertical-align: top;
}

.body pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: #eeece7;
  font-size: 15px;
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  max-width: 1160px;
  margin: 64px auto 0;
  padding: 38px 24px 44px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.foot-brand {
  flex: 0 0 auto;
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  max-width: 440px;
}

.foot-nav dt {
  flex-basis: 100%;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--mute);
}

.foot-nav dd {
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

.foot-tail {
  flex: 0 1 268px;
  text-align: center;
}

.sub {
  display: flex;
  gap: 6px;
}

.sub input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}

.sub button {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

.sub button:hover {
  background: #000;
}

.copy {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--mute);
}

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.dock-track {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1160px;
  margin: 0 auto;
}

.dock-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-side:first-of-type {
  flex: 1;
  justify-content: flex-end;
}

.dock-side:last-of-type {
  flex: 1;
  justify-content: flex-start;
}

.pill,
.dock-brand,
.dock-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

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

.dock-brand {
  padding: 8px 22px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--head);
  font-weight: 700;
}

.dock-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.dock-search input {
  width: 116px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}

.dock-search button {
  background: var(--paper);
}

.dock-search button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* 滚动出现 */
.rv {
  transition: opacity 0.16s linear, transform 0.16s linear;
}

.rv:not(.in) {
  opacity: 0;
  transform: translateY(8px);
}

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

  .rv {
    transition: none;
  }

  .rv:not(.in) {
    opacity: 1;
    transform: none;
  }
}

/* 窄屏 */
@media (max-width: 900px) {
  body {
    padding-bottom: 216px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
    padding: 20px 18px 10px;
  }

  .hero-media {
    min-height: 0;
  }

  .hero-media img,
  .hero-swatch {
    height: 176px;
    min-height: 0;
  }

  .hero-copy {
    text-align: right;
  }

  main {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 22px;
    padding: 0 18px;
  }

  .side {
    position: static;
  }

  .side-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .side-list li {
    border-bottom: 0;
  }

  .side-list a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--wash);
    font-size: 16px;
  }

  .side-list a::before {
    content: none;
  }

  .body > article {
    padding: 24px 18px;
  }

  .foot {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    margin-top: 44px;
    padding: 26px 18px 36px;
  }

  .foot-nav dl {
    max-width: none;
  }

  .foot-tail {
    flex: 1 1 auto;
  }

  .dock {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }

  .dock-track {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .dock-side {
    display: contents;
  }

  .dock-brand {
    order: -1;
    flex: 1 0 100%;
  }

  .pill,
  .dock-search button {
    padding: 8px 12px;
  }

  .dock-search {
    margin-left: 0;
  }

  .dock-search input {
    width: 92px;
  }
}

@media (max-width: 380px) {
  .dock-search input {
    width: 74px;
  }
}

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