@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

/* ============================================================
   CSS 变量 & 重置
   ============================================================ */
:root {
  --c-white: #ffffff;
  --c-surface: #f5f5f5;
  --c-ink: #1f1f1f;
  --c-ink-60: rgba(31,31,31,0.6);
  --c-ink-15: rgba(31,31,31,0.15);
  --c-ink-08: rgba(31,31,31,0.08);
  --c-accent: #1f1f1f;
  --c-accent-hover: #3a3a3a;

  --radius-card: 28px;
  --radius-sm: 12px;
  --radius-btn: 100px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.06);

  --font-display: 'Playfair Display', 'Source Serif 4', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, 'Noto Serif SC', serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --nav-height: 48px;
  --header-total: 104px;
  --max-w: 1280px;
  --gap: 16px;
  --section-pad: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-surface);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--c-surface);
  color: var(--c-ink);
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.2; }

/* ============================================================
   滚动偏移（固定 header）
   ============================================================ */
div[id] { scroll-margin-top: calc(var(--header-total) + 24px); }

/* ============================================================
   站点外层包裹
   ============================================================ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   顶部 Header：两行
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 2px solid var(--c-ink);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* 品牌行 */
.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  border-bottom: 1px solid var(--c-ink-15);
  min-height: 56px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  text-decoration: none;
}

.brand-logo { height: 32px; width: auto; object-fit: contain; }

.brand-name { font-family: var(--font-display); font-weight: 900; }

/* 菜单行 */
.header-nav-row {
  padding: 0 32px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.top-nav { width: 100%; }

.nav-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
}

.nav-dl dt { display: none; }

.nav-dl dd {
  display: flex;
  align-items: stretch;
}

.nav-dl dd a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  min-height: 48px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--c-ink);
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
  border-radius: 0;
  position: relative;
}

.nav-dl dd a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--c-ink);
  transition: transform 0.22s ease;
}

.nav-dl dd a:hover::after,
.nav-dl dd a:focus-visible::after { transform: translateX(-50%) scaleX(1); }

.nav-dl dd a:hover { color: var(--c-ink); background: var(--c-surface); }

/* CTA 按钮 */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  height: 40px;
  background: var(--c-ink);
  color: var(--c-white) !important;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-btn);
  border: 2px solid var(--c-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, transform 0.15s;
  text-decoration: none;
}

.cta-btn:hover, .cta-btn:focus-visible {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  transform: translateY(-1px);
}

.cta-btn--large {
  height: 52px;
  padding: 0 36px;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 80px 32px 80px;
  background: var(--c-white);
  border-bottom: 3px solid var(--c-ink);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1.5px solid var(--c-ink);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--c-ink);
  margin-bottom: 24px;
}

.hero-desc {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--c-ink-60);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero 装饰磁贴 */
.hero-deco {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
  pointer-events: none;
}

.deco-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 2px solid var(--c-ink);
  letter-spacing: -0.02em;
}

.deco-tile--1 {
  width: 120px; height: 120px;
  font-size: 2.8rem;
  background: var(--c-ink);
  color: var(--c-white);
  border-radius: 28px;
}

.deco-tile--2 {
  width: 100px; height: 70px;
  font-size: 1.4rem;
  border-radius: 20px;
  align-self: flex-end;
}

.deco-tile--3 {
  width: 80px; height: 50px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  border-radius: 14px;
}

/* ============================================================
   主体布局：main > section + aside
   ============================================================ */
.site-main {
  flex: 1;
  padding: var(--section-pad) 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ============================================================
   section > div
   ============================================================ */
.main-article { min-width: 0; }

.content-section { width: 100%; }

/* ============================================================
   正文内容 Bento Box 样式
   ============================================================ */

/* 正文内自带的 div —— page.content 里的 div */
.bento-content > div,
.content-section div {
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
  margin-bottom: 24px;
  border-bottom: 4px solid var(--c-ink);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
  position: relative;
  overflow: hidden;
}

.bento-content > div:hover,
.content-section div:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(1.005);
}

/* 正文内 h2 */
.bento-content h2,
.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--c-ink);
}

.bento-content h2 + hr,
.content-section h2 + hr {
  border: none;
  border-top: 2px solid var(--c-ink);
  margin-bottom: 20px;
  opacity: 0.18;
}

.bento-content h3,
.content-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--c-ink);
}

.bento-content h3 + hr,
.content-section h3 + hr {
  border: none;
  border-top: 1px solid var(--c-ink-15);
  margin-bottom: 14px;
}

.bento-content p,
.content-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-ink);
  margin-bottom: 14px;
}

.bento-content ul,
.bento-content ol,
.content-section ul,
.content-section ol {
  padding-left: 1.4em;
  margin-bottom: 14px;
}

.bento-content li,
.content-section li {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 6px;
  list-style: disc;
}

.bento-content a,
.content-section a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}

.bento-content a:hover,
.content-section a:hover { opacity: 0.65; }

/* hr 通用 */
hr {
  border: none;
  border-top: 1.5px solid var(--c-ink-15);
  margin: 20px 0;
}

/* ============================================================
   Aside 侧边栏
   ============================================================ */
.main-aside {
  position: sticky;
  top: calc(var(--header-total) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 28px 20px;
  border-bottom: 4px solid var(--c-ink);
  transition: box-shadow 0.2s;
}

.aside-card:hover { box-shadow: var(--shadow-hover); }

.aside-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--c-ink);
}

.aside-hr {
  border: none;
  border-top: 2px solid var(--c-ink);
  margin-bottom: 16px;
  opacity: 0.2;
}

.aside-nav-list { display: flex; flex-direction: column; gap: 4px; }

.aside-link {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-ink);
  transition: background 0.15s;
  min-height: 40px;
}

.aside-link:hover { background: var(--c-surface); }

.aside-card--info {
  background: var(--c-surface);
  border-bottom-color: var(--c-ink-60);
}

.aside-subtitle {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--c-ink);
}

.aside-tip {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--c-ink-60);
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--c-ink);
  color: var(--c-white);
  padding: 64px 32px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 40px 60px;
  border-top: 3px solid var(--c-ink);
}

/* 品牌区 */
.footer-brand-section {
  grid-column: 1 / 2;
}

.footer-brand-super {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--c-white);
  margin-bottom: 20px;
  opacity: 0.95;
}

.footer-brand-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 380px;
}

/* 导航区 */
.footer-nav-section {
  grid-column: 2 / 3;
  padding-top: 8px;
}

.footer-nav-dl {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-nav-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-nav-dl dd { display: block; }

.footer-nav-dl dd a {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 40px;
  transition: color 0.15s, padding-left 0.15s;
}

.footer-nav-dl dd a:hover {
  color: var(--c-white);
  padding-left: 6px;
}

/* 版权区 */
.footer-copy-section {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

/* ============================================================
   Scroll Reveal 动效
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .reveal-delay-1 { transition-delay: 0.08s; }
  .reveal-delay-2 { transition-delay: 0.16s; }
  .reveal-delay-3 { transition-delay: 0.24s; }

  /* 卡片 hover scale */
  .bento-content > div,
  .content-section div,
  .aside-card {
    will-change: transform;
  }

  /* Parallax hero deco */
  .hero-deco {
    transition: transform 0.1s linear;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   响应式
   ============================================================ */

/* 中等屏幕 */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr 260px;
    gap: 24px;
  }
  .hero-deco { right: 2%; }
  .deco-tile--1 { width: 90px; height: 90px; font-size: 2rem; }
  .deco-tile--2 { width: 80px; height: 56px; font-size: 1.1rem; }
  .deco-tile--3 { width: 64px; height: 42px; font-size: 0.78rem; }

  .site-footer {
    grid-template-columns: 1fr;
  }
  .footer-brand-section { grid-column: 1 / -1; }
  .footer-nav-section { grid-column: 1 / -1; }
}

/* 平板 */
@media (max-width: 768px) {
  :root { --section-pad: 48px; }

  .header-brand-row { padding: 10px 20px; }
  .header-nav-row { padding: 0 12px; overflow-x: auto; }

  .nav-dl dd a {
    padding: 0 10px;
    font-size: 0.82rem;
    min-height: 48px;
  }

  .hero-section { padding: 60px 20px 60px; min-height: 60vh; }
  .hero-deco { display: none; }

  .site-main { padding: var(--section-pad) 20px; }

  .main-layout {
    grid-template-columns: 1fr;
  }
  .main-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .aside-card { flex: 1 1 240px; }

  .site-footer {
    padding: 48px 20px 28px;
    gap: 32px;
  }
  .footer-copy-section { grid-column: 1 / -1; }
}

/* 移动端 375px */
@media (max-width: 480px) {
  html { font-size: 16px; }

  .header-brand-row { padding: 8px 16px; min-height: 52px; }
  .brand-name { font-size: 1.1rem; }
  .header-cta { padding: 0 14px; height: 36px; font-size: 0.82rem; }

  .nav-dl dd a { padding: 0 8px; font-size: 0.8rem; }

  .hero-section { padding: 48px 16px 48px; min-height: 55vh; }
  .hero-title { font-size: 2.4rem; }
  .hero-desc { font-size: 1rem; }
  .cta-btn--large { height: 48px; padding: 0 28px; }

  .site-main { padding: 36px 16px; }

  .bento-content > div,
  .content-section div {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .aside-card { padding: 22px 18px 16px; border-radius: 20px; }

  .main-aside { flex-direction: column; }

  .site-footer { padding: 40px 16px 24px; }
  .footer-brand-super { font-size: 2.2rem; }

  /* tap 区域保证 ≥40px */
  .footer-nav-dl dd a { min-height: 44px; }
  .aside-link { min-height: 44px; }
  .nav-dl dd a { min-height: 48px; }
}
