@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&display=swap');

:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --paper-3: #ece7dd;
  --ink: #1a1a1a;
  --rule: #e2ddd2;
  --muted: #6f695f;
  --r: 18px;
  --wrap: 1120px;
  --gap: 1.15rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-bottom: 8.5rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .32;
  mix-blend-mode: multiply;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

h1, h2, h3, h4,
.dock,
.hero-brand,
.f-mark,
article small,
.rail small,
.rail-list a,
.f-list a,
.f-copy {
  font-family: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

h1, h2, h3 {
  letter-spacing: -.012em;
  line-height: 1.22;
}

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

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  min-height: 70vh;
  padding: 4rem 1.25rem 5.5rem;
  background: var(--ink);
  color: var(--paper);
  isolation: isolate;
}

.hero-fig {
  margin: 0;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(18, 17, 15, .66);
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 40rem;
  text-align: right;
}

.hero-brand {
  display: block;
  margin-bottom: .85rem;
  font-size: .78rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: #cec6b6;
}

.hero h1 {
  margin: 0 auto 1rem;
  max-width: 22ch;
  font-size: clamp(2.1rem, 6.2vw, 4.1rem);
  line-height: 1.05;
}

.hero p {
  margin: 0 0 0 auto;
  max-width: 34rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #e6e0d4;
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 2.4rem;
  background: var(--paper);
  clip-path: polygon(0 66%, 100% 0, 100% 100%, 0 100%);
}

@media (min-width: 900px) {
  .hero {
    padding: 6rem 3rem 6.5rem;
  }
  .hero-band {
    height: 3.2rem;
  }
}

/* ---------- main frame ---------- */

main {
  display: grid;
  gap: 2rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2.4rem 1.25rem 4rem;
}

@media (min-width: 900px) {
  main {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 3.2rem;
    padding: 4rem 3rem 5rem;
  }
}

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

.rail {
  align-self: start;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

.rail small {
  display: block;
  font-size: .72rem;
  letter-spacing: .28em;
  color: var(--muted);
}

.rail h2 {
  margin: .3rem 0 .9rem;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.rail-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .35rem .9rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: .87rem;
  text-decoration: none;
  transition: background-color .1s linear, color .1s linear;
}

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

@media (min-width: 900px) {
  .rail {
    position: sticky;
    top: 1.5rem;
    border-bottom: 0;
    padding-bottom: 0;
  }
  .rail-list {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .rail-list a {
    border-radius: var(--r);
  }
}

/* ---------- div body ---------- */

.sheet {
  min-width: 0;
}

.sheet article {
  scroll-margin-top: 1.5rem;
  scroll-margin-bottom: 9rem;
}

.sheet article + article {
  margin-top: 2.6rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--rule);
}

.sheet small {
  display: block;
  margin-bottom: .45rem;
  font-size: .72rem;
  letter-spacing: .26em;
  color: var(--muted);
}

.sheet h2 {
  margin: .1rem 0 1rem;
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
}

.sheet h3 {
  margin: 2rem 0 .55rem;
  font-size: 1.14rem;
}

.sheet p {
  margin: 0 0 1.1rem;
}

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

.sheet li {
  margin: .35rem 0;
}

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

.sheet blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--r);
  background: var(--paper-2);
}

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

.sheet img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: var(--r);
}

.sheet table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: .95rem;
}

.sheet th,
.sheet td {
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.sheet figure {
  margin: 1.5rem 0;
}

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

.foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  padding: 3rem 1.25rem 1.5rem;
  background: var(--ink);
  color: #ded7ca;
}

.f-mark {
  margin: 0 0 .6rem;
  font-size: 1.35rem;
  letter-spacing: .3em;
  color: var(--paper);
}

.f-desc {
  margin: 0;
  max-width: 30rem;
  font-size: .92rem;
  line-height: 1.75;
  color: #b7b0a6;
}

.f-nav h2 {
  margin: 0 0 .8rem;
  font-size: .82rem;
  letter-spacing: .26em;
  color: #8f887e;
}

.f-list {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.f-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: .88rem;
  color: #ded7ca;
  text-decoration: none;
}

.f-list a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.f-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid #3a3733;
  font-size: .78rem;
  letter-spacing: .12em;
  color: #9a938a;
}

@media (min-width: 760px) {
  .foot {
    grid-template-columns: 1.4fr 1fr;
    padding: 3.5rem 3rem 1.6rem;
  }
}

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

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .45rem .6rem calc(.5rem + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.dock-brand {
  order: -1;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: .3rem;
  font-size: .78rem;
  letter-spacing: .34em;
  color: var(--ink);
  text-decoration: none;
}

.dock-list {
  display: flex;
  gap: .4rem;
  width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 0 0 .1rem;
  list-style: none;
  scrollbar-width: none;
}

.dock-list::-webkit-scrollbar {
  display: none;
}

.dock-list li {
  flex: 0 0 auto;
  order: 0 !important;
}

.dock-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .85rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: .84rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .1s linear, color .1s linear;
}

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

@media (min-width: 860px) {
  body {
    padding-bottom: 6.5rem;
  }
  .dock {
    flex-wrap: nowrap;
    padding: .6rem 1.25rem calc(.6rem + env(safe-area-inset-bottom));
    gap: .45rem;
  }
  .dock-brand {
    order: 4;
    flex: 0 0 auto;
    padding: 0 1.4rem;
    font-size: .95rem;
    letter-spacing: .26em;
    min-height: 40px;
    border-left: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
  }
  .dock-list {
    display: contents;
    width: auto;
    overflow: visible;
    padding: 0;
  }
  .dock-list li {
    flex: 0 0 auto;
  }
  .dock-list li:nth-child(1) { order: 1; }
  .dock-list li:nth-child(2) { order: 2; }
  .dock-list li:nth-child(3) { order: 3; }
  .dock-list li:nth-child(n+4) { order: 5; }
}

/* ---------- misc ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

@media (min-width: 900px) {
  .sheet article {
    scroll-margin-bottom: 7rem;
  }
}

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