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

/* ============================================================
   CSS 变量 & 基础重置
   ============================================================ */
:root {
  --c-bg: #fafaf8;
  --c-mid: #4a4a4a;
  --c-ink: #1a1a1a;
  --c-border: #1a1a1a;
  --c-accent: #1a1a1a;
  --c-card-line: #1a1a1a;
  --c-muted: #6b6b6b;
  --c-pill-bg: #f0efec;
  --c-pill-hover: #1a1a1a;
  --c-pill-hover-text: #fafaf8;

  --font-main: 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --header-h: 64px;
  --anchor-h: 44px;
  --total-sticky: calc(var(--header-h) + var(--anchor-h));

  --radius-card: 4px;
  --max-w: 1200px;
  --gap: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-bg);
  color: var(--c-ink);
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  background: var(--c-bg);
  color: var(--c-ink);
  overflow-x: hidden;
  position: relative;
}

/* 纸张质感底纹 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(26,26,26,0.3) 2px,
      rgba(26,26,26,0.3) 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 40px,
      rgba(26,26,26,0.08) 40px,
      rgba(26,26,26,0.08) 41px
    );
}

a {
  color: var(--c-ink);
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

/* section 滚动偏移（粘性导航） */
section[id] {
  scroll-margin-top: var(--total-sticky);
}

/* ============================================================
   布局容器
   ============================================================ */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

/* ============================================================
   顶部主导航 Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  background: var(--c-bg);
  border-bottom: 2px solid var(--c-border);
  /* 手绘感微歪 */
  background-image:
    linear-gradient(
      180deg,
      rgba(26,26,26,0.03) 0%,
      transparent 100%
    );
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 品牌角落图标 */
.brand-corner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--c-border);
  border-radius: 2px;
  transform: rotate(-1.2deg);
  transition: transform 0.15s;
  overflow: hidden;
}

.brand-corner:hover {
  transform: rotate(0.5deg) scale(1.05);
}

.logo-mark-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.02em;
}

.logo-img, .logo-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Nav aside */
.nav-aside {
  flex: 1;
  overflow: hidden;
}

.primary-nav ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.primary-nav ul::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  background: var(--c-pill-bg);
  border: 1.5px solid var(--c-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--c-ink);
  transition: background 0.12s, color 0.12s;
  letter-spacing: 0.01em;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: var(--c-pill-hover);
  color: var(--c-pill-hover-text);
  outline: none;
}

/* 主 CTA */
.header-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  background: var(--c-ink);
  color: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transform: rotate(0.4deg);
  transition: transform 0.12s, background 0.12s;
}

.header-cta:hover {
  transform: rotate(-0.3deg) scale(1.03);
  background: var(--c-mid);
}

/* ============================================================
   粘性锚点条
   ============================================================ */
.sticky-anchor-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 850;
  height: var(--anchor-h);
  background: var(--c-ink);
  border-bottom: 1.5px solid var(--c-border);
  overflow: hidden;
}

.anchor-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-bar-inner::-webkit-scrollbar {
  display: none;
}

.anchor-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: transparent;
  color: var(--c-bg);
  border: 1px solid rgba(250,250,248,0.25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: background 0.1s, border-color 0.1s;
  min-height: 40px;
}

.anchor-pill:hover,
.anchor-pill:focus-visible {
  background: rgba(250,250,248,0.15);
  border-color: rgba(250,250,248,0.6);
  outline: none;
}

/* ============================================================
   Hero 区块
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 80px var(--gap) 60px;
  overflow: hidden;
  border-bottom: 3px solid var(--c-border);
}

/* 超大背景文字 */
.hero-bg-text {
  position: absolute;
  right: -0.05em;
  bottom: -0.15em;
  font-size: clamp(120px, 22vw, 320px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(26,26,26,0.08);
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  text-align: right;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-mid);
  border: 1.5px solid var(--c-border);
  padding: 4px 10px;
  margin-bottom: 24px;
  transform: rotate(0.5deg);
  background: var(--c-bg);
}

.hero-h1 {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--c-ink);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 16px;
  font-weight: 400;
  color: var(--c-mid);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--c-ink);
  color: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transform: rotate(-0.5deg);
  transition: transform 0.12s, background 0.12s;
}

.hero-cta-btn:hover {
  transform: rotate(0.3deg) scale(1.02);
  background: var(--c-mid);
}

/* 装饰线 + 序号 */
.hero-deco {
  position: absolute;
  left: var(--gap);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.deco-line {
  display: block;
  height: 2px;
  background: var(--c-border);
  transform-origin: left center;
}

.deco-line-1 {
  width: 60px;
  transform: rotate(-1deg);
}

.deco-line-2 {
  width: 38px;
  transform: rotate(0.8deg);
  opacity: 0.4;
}

.deco-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-mid);
  margin-top: 6px;
}

/* ============================================================
   正文主体
   ============================================================ */
.site-main {
  padding: 60px 0 80px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.content-section {
  width: 100%;
}

.content-article {
  width: 100%;
}

/* ============================================================
   正文内容排版
   page.content 里各 section 的通用样式
   ============================================================ */
.content-article section {
  padding: 56px 0;
  border-bottom: 1.5px solid rgba(26,26,26,0.12);
  position: relative;
}

.content-article section:last-child {
  border-bottom: none;
}

.content-article h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--c-ink);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

/* 底部强调线 */
.content-article h2::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: var(--c-ink);
  margin-top: 6px;
  transform: rotate(-0.3deg);
}

.content-article p.subtitle,
.content-article p.subhead,
.content-article p.desc,
.content-article p.lead {
  font-size: 15px;
  color: var(--c-mid);
  margin-bottom: 20px;
  font-weight: 400;
  line-height: 1.6;
}

.content-article p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-mid);
  margin-bottom: 16px;
  max-width: 75ch;
}

.content-article h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-ink);
  margin-top: 28px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.content-article h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
  margin-top: 20px;
  margin-bottom: 8px;
}

.content-article ul,
.content-article ol {
  padding-left: 0;
  margin-bottom: 20px;
}

.content-article ul li,
.content-article ol li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-mid);
  border-bottom: 1px dashed rgba(26,26,26,0.1);
}

.content-article ul li:last-child,
.content-article ol li:last-child {
  border-bottom: none;
}

.content-article ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--c-ink);
  font-weight: 700;
}

.content-article ol {
  counter-reset: list-counter;
}

.content-article ol li {
  counter-increment: list-counter;
}

.content-article ol li::before {
  content: counter(list-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-ink);
  top: 8px;
  letter-spacing: 0.05em;
}

.content-article a {
  color: var(--c-ink);
  border-bottom: 1.5px solid var(--c-ink);
  transition: opacity 0.1s;
}

.content-article a:hover {
  opacity: 0.6;
}

.content-article strong {
  font-weight: 600;
  color: var(--c-ink);
}

.content-article blockquote {
  border-left: 3px solid var(--c-ink);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(26,26,26,0.03);
  transform: rotate(0.15deg);
}

.content-article blockquote p {
  margin-bottom: 0;
  font-style: italic;
}

/* 卡片样式（底部强调线） */
.content-article .card,
.content-article [class*="card"] {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-card);
  border-bottom: 3px solid var(--c-card-line);
  padding: 20px;
  background: var(--c-bg);
  margin-bottom: 16px;
  position: relative;
  transform: rotate(0.1deg);
  transition: transform 0.1s;
}

.content-article .card:hover,
.content-article [class*="card"]:hover {
  transform: rotate(-0.1deg) translateY(-2px);
}

/* table */
.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}

.content-article th {
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.content-article td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(26,26,26,0.1);
  color: var(--c-mid);
}

.content-article tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--c-ink);
  color: var(--c-bg);
  border-top: 3px solid var(--c-border);
  padding: 60px var(--gap) 0;
}

.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(250,250,248,0.15);
}

.footer-brand-big {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--c-bg);
  transform: rotate(-0.5deg);
  display: inline-block;
}

.footer-brand-desc {
  font-size: 14px;
  color: rgba(250,250,248,0.55);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250,250,248,0.45);
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(250,250,248,0.12);
  padding-bottom: 8px;
}

.footer-nav-col nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-nav-col nav ul li a {
  font-size: 14px;
  color: rgba(250,250,248,0.7);
  display: inline-block;
  padding: 5px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.1s;
}

.footer-nav-col nav ul li a:hover {
  color: var(--c-bg);
}

.footer-info-col p,
.footer-contact-col p {
  font-size: 14px;
  color: rgba(250,250,248,0.55);
  line-height: 1.6;
}

.footer-contact-col a {
  color: rgba(250,250,248,0.7);
  border-bottom: 1px solid rgba(250,250,248,0.25);
  transition: color 0.1s;
}

.footer-contact-col a:hover {
  color: var(--c-bg);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-copy {
  font-size: 12px;
  color: rgba(250,250,248,0.35);
  letter-spacing: 0.04em;
}

/* ============================================================
   Parallax & 动效
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg-text {
    will-change: transform;
    transition: transform 0.05s linear;
  }

  /* Stagger list reveal */
  .content-article section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .content-article section.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .content-article ul li,
  .content-article ol li {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .content-article ul.visible li,
  .content-article ol.visible li {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-article section,
  .content-article ul li,
  .content-article ol li {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 56px;
    --anchor-h: 40px;
  }

  .header-inner {
    gap: 10px;
  }

  .nav-aside {
    display: none;
  }

  .hero-section {
    min-height: 70vh;
    padding: 60px 16px 48px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .hero-inner {
    text-align: left;
    max-width: 100%;
  }

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

  .hero-bg-text {
    font-size: clamp(80px, 30vw, 150px);
    right: -0.1em;
  }

  .hero-deco {
    display: none;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-brand-big {
    font-size: clamp(28px, 10vw, 44px);
  }

  .site-main {
    padding: 40px 0 60px;
  }

  .content-article h2 {
    font-size: 20px;
  }

  .anchor-bar-inner {
    gap: 3px;
    padding: 0 12px;
  }

  .anchor-pill {
    font-size: 11px;
    padding: 0 9px;
  }
}

@media (max-width: 375px) {
  .header-cta {
    padding: 0 12px;
    font-size: 13px;
    height: 36px;
  }
}
