@charset "utf-8";

:root {
  --ink: #000000;
  --paper: #ffffff;
  --wash: #f2f2f0;
  --line: #d8d8d4;
  --mute: #4d4d4d;
  --r: 18px;
  --g: 8px;
  --dock: 112px;
  --shell: 1180px;
}

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

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

body {
  margin: 0;
  padding-bottom: var(--dock);
  background: var(--wash);
  color: var(--ink);
  font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Varela Round", "Nunito Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; }

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

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: calc(var(--g) * 9) calc(var(--g) * 3);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background-image: radial-gradient(#ffffff 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  opacity: 0.16;
  transform: translate3d(0, var(--py, 0), 0);
  will-change: transform;
}

.hero-in {
  text-align: center;
  max-width: 960px;
}

.hero-brand {
  margin: 0 0 calc(var(--g) * 3);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  opacity: 0.72;
}

.hero h1 {
  font-size: clamp(2.5rem, 9.5vw, 7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  word-break: break-word;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-brand,
  .hero h1 {
    animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .hero h1 { animation-delay: 0.08s; }
}

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

/* ---------- shell ---------- */

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--g) * 6) calc(var(--g) * 2.5) calc(var(--g) * 8);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: calc(var(--g) * 2);
  align-items: start;
}

.col {
  grid-column: 1 / span 8;
  min-width: 0;
}

/* ---------- section cards ---------- */

.doc > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
  padding: clamp(20px, 4vw, 42px);
  margin: 0 0 calc(var(--g) * 2.5);
  scroll-margin-top: calc(var(--g) * 2);
}

.doc > div:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) {
  .doc > div {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .doc > div:nth-child(1) { animation-delay: 0.04s; }
  .doc > div:nth-child(2) { animation-delay: 0.10s; }
  .doc > div:nth-child(3) { animation-delay: 0.16s; }
  .doc > div:nth-child(4) { animation-delay: 0.22s; }
  .doc > div:nth-child(5) { animation-delay: 0.28s; }
  .doc > div:nth-child(6) { animation-delay: 0.34s; }
  .doc > div:nth-child(7) { animation-delay: 0.40s; }
}

.doc h2 {
  font-size: clamp(1.45rem, 3.1vw, 2.05rem);
  line-height: 1.25;
  margin: 0 0 calc(var(--g) * 2);
}

.doc h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: calc(var(--g) * 3) 0 var(--g);
}

.doc h2 + hr {
  border: 0;
  border-top: 2px solid var(--ink);
  width: 64px;
  margin: calc(var(--g) * -1.5) 0 calc(var(--g) * 3);
}

.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: calc(var(--g) * 3) 0;
}

.doc p {
  margin: 0 0 1.05em;
}

.doc p:last-child { margin-bottom: 0; }

.doc ul,
.doc ol {
  margin: 0 0 1.05em;
  padding-left: 1.35em;
}

.doc li { margin-bottom: 0.4em; }

.doc li::marker { color: var(--mute); }

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

.doc a:hover { background: #ecece8; }

.doc strong, .doc b { font-weight: 700; }

.doc blockquote {
  margin: 0 0 1.05em;
  padding: 2px 0 2px calc(var(--g) * 2);
  border-left: 3px solid var(--ink);
  color: var(--mute);
}

.doc code,
.doc pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.doc pre {
  overflow-x: auto;
  padding: calc(var(--g) * 2);
  background: #f4f4f2;
  border-radius: 12px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.05em;
  font-size: 16px;
}

.doc th, .doc td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.doc th { font-weight: 700; }

/* ---------- aside ---------- */

.rail {
  grid-column: 9 / span 4;
  position: sticky;
  top: calc(var(--g) * 3);
  align-self: start;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  padding: calc(var(--g) * 2.5);
}

.rail h2 {
  font-size: 15px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  margin: 0;
}

.rail hr {
  border: 0;
  border-top: 1px solid var(--mute);
  margin: calc(var(--g) * 1.5) 0;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  font-size: 16px;
  line-height: 1.4;
}

.rail li { counter-increment: toc; }

.rail li:last-child a { border-bottom: 0; }

.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid #242424;
}

.rail a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.55;
}

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

/* ---------- footer ---------- */

.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding: calc(var(--g) * 7) calc(var(--g) * 2.5) calc(var(--g) * 4);
}

.foot-in {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--g) * 2) calc(var(--g) * 3);
}

.foot-brand {
  font-family: "Varela Round", "Nunito Sans", "PingFang SC", sans-serif;
  font-size: clamp(1.5rem, 4.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
  margin: 0;
  font-size: 15px;
}

.foot-nav dt {
  font-size: 13px;
  letter-spacing: 0.18em;
  opacity: 0.55;
}

.foot-nav dd { margin: 0; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

.foot-copy {
  margin: 0;
  font-size: 14px;
  opacity: 0.6;
}

/* ---------- dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid #262626;
  padding: 6px calc(var(--g) * 1.5) calc(6px + env(safe-area-inset-bottom, 0px));
}

.dock-inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav cta";
  align-items: center;
  gap: var(--g);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-right: 6px;
  color: var(--paper);
  text-decoration: none;
  font-family: "Varela Round", "Nunito Sans", "PingFang SC", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.brand .mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
}

.dock-nav { grid-area: nav; min-width: 0; }

.dock-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-nav a,
.dock-nav summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
}

.dock-nav a:hover,
.dock-nav summary:hover { background: #242424; }

.dock-nav a.on { background: var(--paper); color: var(--ink); }

.grp { position: relative; }

.grp summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

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

.grp summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
  opacity: 0.65;
}

.grp[open] summary { background: #242424; }

.grp .sub {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 172px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.grp .sub a {
  width: 100%;
  color: var(--ink);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 16px;
}

.grp .sub a:hover { background: #ecece8; }
.grp .sub a.on { background: var(--ink); color: var(--paper); }

.cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.cta:hover { background: #dcdcd8; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; }
  .col, .rail { grid-column: 1 / -1; }
  .rail { position: static; }
}

@media (max-width: 760px) {
  :root { --dock: 108px; }
  .dock-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand cta"
      "nav nav";
  }
  .dock-nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .dock-nav ul::-webkit-scrollbar { display: none; }
  .wrap { padding-left: calc(var(--g) * 2); padding-right: calc(var(--g) * 2); }
  .site-foot { padding-left: calc(var(--g) * 2); padding-right: calc(var(--g) * 2); }
  .foot-in { flex-direction: column; align-items: flex-start; gap: calc(var(--g) * 2.5); }
  .foot-copy { width: 100%; }
  .hero { padding: calc(var(--g) * 8) calc(var(--g) * 2.5); }
}

@media (max-width: 380px) {
  body { font-size: 16px; }
  .brand-txt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before { transform: none; }
}

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