/* 瑞士网格 · 黑白 · 点阵秩序 */

:root {
  --ink: #000000;
  --paper: #ffffff;
  --bar: 68px;
  --unit: 8px;
  --edge: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  padding-bottom: calc(var(--bar) + 2rem);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Outfit', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

/* 跳转 */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* 底部固定条 */

.masthead {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  border-top: 2px solid var(--ink);
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.35rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-dot {
  width: 12px;
  height: 12px;
  background: var(--ink);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.brand:hover .brand-dot,
.brand:focus-visible .brand-dot {
  transform: rotate(45deg) scale(1.15);
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.dock {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.dock p {
  display: flex;
  justify-content: flex-start;
  gap: 0.35rem;
  margin: 0;
}

.dock a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.dock a:first-child {
  background: var(--ink);
  color: var(--paper);
}

.dock a:hover,
.dock a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* 版心 */

.frame {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem var(--edge) 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

/* 侧栏 */

.rail {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.85rem;
}

.rail-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.rail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}

.rail-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.rail-links a:hover,
.rail-links a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* 首屏 */

.hero {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  min-height: 45vh;
  padding: 1rem 0 2rem;
  border-bottom: 4px solid var(--ink);
  scroll-margin-top: 1.5rem;
}

.hero-mark {
  margin: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background-image: radial-gradient(var(--ink) 1.5px, transparent 1.7px);
  background-size: 10px 10px;
  background-position: 0 0;
  overflow: hidden;
}

.hero-mark .mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.mark-dots {
  width: 54%;
  height: 54%;
  background: var(--ink);
}

.hero-copy {
  text-align: right;
  min-width: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 7.5vw, 3.3rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-desc {
  margin: 0.8rem 0 0 auto;
  max-width: 38ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #101010;
}

/* 正文 */

.spread {
  min-width: 0;
}

.spread > article {
  scroll-margin-top: 1.5rem;
  padding: 2.1rem 0;
  border-top: 1px solid var(--ink);
}

.spread > article:not(.hero) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 1rem;
}

.spread > article:not(.hero) > * {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 70ch;
}

.spread small {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.spread h2 {
  margin: 0 0 0.9rem;
  max-width: 26ch;
  font-size: clamp(1.5rem, 4.6vw, 2.25rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.spread h3 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.spread p {
  margin: 0 0 1rem;
}

.spread ul,
.spread ol {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.spread li {
  margin: 0.3rem 0;
}

.spread li::marker {
  font-weight: 700;
}

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

.spread a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration-color: transparent;
}

.spread strong {
  font-weight: 700;
}

.spread blockquote {
  margin: 1.3rem 0;
  padding: 1rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
}

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

.spread blockquote a {
  color: var(--paper);
}

.spread hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 1.6rem 0;
}

.spread figure {
  margin: 1.3rem 0;
}

.spread figcaption {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.spread table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  font-size: 0.92rem;
}

.spread th,
.spread td {
  border-bottom: 1px solid var(--ink);
  padding: 0.55rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.spread th {
  font-weight: 700;
  border-bottom-width: 2px;
}

.spread pre {
  margin: 0 0 1.2rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: #f2f2f2;
  font-size: 0.85rem;
  line-height: 1.55;
}

.spread code {
  font-size: 0.92em;
}

/* 页脚 */

.base {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 1.5rem var(--edge);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  display: grid;
  gap: 0.3rem;
}

.base p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.base small {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  opacity: 0.72;
}

/* 动效 */

.js .spread > article {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .spread > article.in {
  opacity: 1;
  transform: none;
}

/* 桌面 */

@media (min-width: 860px) {
  body {
    font-size: 18px;
  }

  .dock p {
    justify-content: flex-end;
  }

  .frame {
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 2.5rem;
    padding-top: 2.5rem;
  }

  .rail {
    position: sticky;
    top: 1.75rem;
    border-bottom: 0;
    padding-bottom: 0;
  }

  .rail-links {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
  }

  .rail-links a {
    min-height: 40px;
    border: 0;
    border-bottom: 1px solid var(--ink);
    padding: 0.35rem 0;
  }

  .rail-links a:first-child {
    border-top: 1px solid var(--ink);
  }

  .hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.5rem 0 2.5rem;
  }

  .hero-mark {
    grid-column: 1 / span 3;
    max-width: 220px;
  }

  .hero-copy {
    grid-column: 5 / -1;
    padding-bottom: 0.5rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  }

  .spread > article {
    padding: 3rem 0;
  }

  .spread > article:not(.hero) > * {
    grid-column: 1 / span 10;
  }
}

@media (min-width: 1180px) {
  .spread > article:not(.hero) > * {
    grid-column: 1 / span 8;
  }
}

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

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

  .js .spread > article {
    opacity: 1;
    transform: none;
  }
}

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