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

/* ============================================================
   CSS 变量
   ============================================================ */
:root {
  --paper: #fdfbf7;
  --paper2: #f5f5f5;
  --ink: #1a1a1a;
  --ink-mid: #3a3a3a;
  --ink-light: #6b6b6b;
  --border: #d8d6d0;
  --border-strong: #b0aea8;
  --accent: #1a1a1a;
  --accent-inv: #fdfbf7;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(26,26,26,.10), 0 1px 2px rgba(26,26,26,.06);
  --shadow-lg: 0 6px 24px rgba(26,26,26,.13);
  --font-body: 'DM Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-head: 'Space Grotesk', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --bn-h: 64px;
  --top-h: 56px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top-h) + 8px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

body {
  min-height: 100vh;
  background: var(--paper);
  /* paper noise texture */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  padding-bottom: var(--bn-h);
}

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

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, menu { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }

/* ============================================================
   顶部品牌栏
   ============================================================ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--top-h);
  padding: 0 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}

.logo-mark { height: 36px; width: auto; }

/* 分组下拉导航（details/summary/menu） */
.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.top-nav::-webkit-scrollbar { display: none; }

.nav-group {
  position: relative;
}

.nav-group > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper2);
  color: var(--ink);
  user-select: none;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: ' ▾';
  font-size: .7rem;
  margin-left: 4px;
}
.nav-group[open] > summary::after { content: ' ▴'; }

.nav-group > menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 120px;
  padding: 4px 0;
}

.nav-group > menu li a {
  display: block;
  padding: 8px 16px;
  font-size: .9rem;
  white-space: nowrap;
  color: var(--ink);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.nav-group > menu li a:hover {
  background: var(--paper2);
  text-decoration: none;
}

/* 搜索框 */
.top-search { flex-shrink: 0; }
.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  height: 38px;
}
.search-form input {
  border: none;
  background: var(--paper2);
  padding: 0 10px;
  font-size: .85rem;
  width: 160px;
  color: var(--ink);
  outline: none;
  height: 100%;
}
.search-form button {
  background: var(--ink);
  color: var(--accent-inv);
  border: none;
  padding: 0 14px;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .85rem;
  height: 100%;
  min-width: 40px;
}
.search-form button:hover { background: var(--ink-mid); }

/* ============================================================
   Hero（双图错位拼贴，约 70vh，文案居中）
   ============================================================ */
.hero-wrap {
  position: relative;
  height: 70vh;
  min-height: 380px;
  max-height: 720px;
  overflow: hidden;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-collage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-img-slot {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-slot-1 {
  width: 52%;
  height: 80%;
  top: 5%;
  left: -2%;
  opacity: .55;
  transform: rotate(-2deg);
}
.hero-slot-2 {
  width: 48%;
  height: 72%;
  bottom: 5%;
  right: -1%;
  opacity: .50;
  transform: rotate(1.5deg);
}

.hero-img { width: 100%; height: 100%; object-fit: cover; }

/* paper noise overlay on hero */
.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero-center {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px;
  max-width: 640px;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--accent-inv);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

.hero-sub {
  font-size: clamp(.95rem, 2.5vw, 1.15rem);
  color: rgba(253,251,247,.8);
  margin-bottom: 20px;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  background: rgba(253,251,247,.15);
  border: 1px solid rgba(253,251,247,.35);
  color: var(--accent-inv);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 4px 12px;
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
}

.hero-cta {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 32px;
  border-radius: var(--radius);
  border: 2px solid var(--paper);
  min-height: 48px;
  line-height: 1.2;
}
.hero-cta:hover {
  background: var(--paper2);
  text-decoration: none;
}

/* ============================================================
   主内容布局（aside 左 + 正文右）
   ============================================================ */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}

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

/* Aside */
.content-aside {
  position: sticky;
  top: calc(var(--top-h) + 12px);
}

.aside-inner {
  background: var(--paper2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.aside-title {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.aside-inner hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 12px;
}

.aside-nav-list li {
  margin-bottom: 2px;
}
.aside-nav-list li a {
  display: block;
  padding: 7px 8px;
  border-radius: var(--radius);
  font-size: .88rem;
  color: var(--ink-mid);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.aside-nav-list li a:hover {
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.aside-tip {
  margin-top: 14px;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.aside-tip strong {
  display: block;
  font-size: .8rem;
  font-family: var(--font-head);
  margin-bottom: 4px;
  color: var(--ink);
}
.aside-tip p {
  font-size: .8rem;
  color: var(--ink-light);
  line-height: 1.5;
}

/* 正文容器 */
.content-body {
  min-width: 0;
}

.content-sections {
  position: relative;
}

.content-figure {
  float: right;
  margin: 0 0 12px 20px;
  width: 80px;
}

.figure-deco {
  width: 80px;
  height: 80px;
  background: var(--paper2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ============================================================
   page.content 内部样式（section、h2、h3、p、ul、ol）
   ============================================================ */
.content-sections section,
.content-body section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.content-sections section:last-child,
.content-body section:last-child {
  border-bottom: none;
}

.content-sections h2,
.content-body h2 {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.content-sections h2 + hr,
.content-body h2 + hr {
  border: none;
  border-top: 2px solid var(--ink);
  margin-bottom: 16px;
}

.content-sections h3,
.content-body h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-mid);
  margin: 24px 0 6px;
}

.content-sections h3 + hr,
.content-body h3 + hr {
  border: none;
  border-top: 1px solid var(--border-strong);
  margin-bottom: 14px;
}

.content-sections p,
.content-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-mid);
  margin-bottom: 12px;
}

.content-sections ul,
.content-sections ol,
.content-body ul,
.content-body ol {
  padding-left: 1.4em;
  margin-bottom: 12px;
  color: var(--ink-mid);
  font-size: 1rem;
  line-height: 1.7;
}

.content-sections li,
.content-body li {
  margin-bottom: 4px;
}

.content-sections a,
.content-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--border-strong);
  text-decoration: none;
}
.content-sections a:hover,
.content-body a:hover {
  border-bottom-color: var(--ink);
  text-decoration: none;
}

/* 卡片式子块（若 content 内有） */
.content-sections .card,
.content-body .card {
  background: var(--paper2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--paper2);
  margin-top: 0;
  padding-bottom: calc(var(--bn-h) + 8px);
}

/* footer > section×n */
.footer-brand-sec {
  padding: 36px 24px 24px;
  border-bottom: 1px solid rgba(253,251,247,.12);
}

.footer-brand-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand-name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  margin-bottom: 6px;
  color: var(--paper);
}

.footer-tagline {
  font-size: .9rem;
  color: rgba(253,251,247,.6);
  line-height: 1.5;
}

.footer-links-sec {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(253,251,247,.12);
}

.footer-cols {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: rgba(253,251,247,.5);
  margin-bottom: 10px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a {
  font-size: .88rem;
  color: rgba(253,251,247,.75);
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
}
.footer-col ul li a:hover {
  color: var(--paper);
  text-decoration: none;
}

.footer-col-contact p {
  font-size: .85rem;
  color: rgba(253,251,247,.7);
  margin-bottom: 6px;
}
.footer-col-contact p a {
  color: rgba(253,251,247,.85);
}

.footer-form {
  display: flex;
  gap: 0;
  margin-top: 10px;
  border: 1px solid rgba(253,251,247,.2);
  border-radius: var(--radius);
  overflow: hidden;
}
.footer-form input {
  flex: 1;
  background: rgba(253,251,247,.06);
  border: none;
  color: var(--paper);
  padding: 0 10px;
  font-size: .83rem;
  height: 40px;
  outline: none;
}
.footer-form input::placeholder { color: rgba(253,251,247,.35); }
.footer-form button {
  background: rgba(253,251,247,.15);
  color: var(--paper);
  border: none;
  padding: 0 14px;
  font-family: var(--font-head);
  font-size: .83rem;
  cursor: pointer;
  height: 40px;
  white-space: nowrap;
  min-width: 40px;
}
.footer-form button:hover { background: rgba(253,251,247,.25); }

.footer-bottom-sec {
  padding: 18px 24px;
  text-align: center;
}

.footer-copy {
  font-size: .8rem;
  color: rgba(253,251,247,.45);
  margin-bottom: 4px;
  line-height: 1.5;
}
.footer-note {
  font-size: .75rem;
  color: rgba(253,251,247,.3);
  line-height: 1.4;
}

/* ============================================================
   底部固定导航条
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--bn-h);
  background: var(--paper);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(26,26,26,.10);
}

.bottom-nav ul {
  display: flex;
  align-items: stretch;
  height: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.bottom-nav ul::-webkit-scrollbar { display: none; }

.bottom-nav ul li {
  flex: 1;
  min-width: 48px;
}

.bottom-nav ul li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: var(--bn-h);
  padding: 4px 4px;
  color: var(--ink-light);
  text-decoration: none;
  gap: 2px;
}
.bottom-nav ul li a:hover {
  color: var(--ink);
  background: var(--paper2);
  text-decoration: none;
}

.bn-icon {
  font-size: 1.2rem;
  line-height: 1;
  display: block;
}
.bn-label {
  font-size: .62rem;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56px;
  text-align: center;
}

/* ============================================================
   scroll-margin-top for sections（吸顶后留白）
   ============================================================ */
section[id] {
  scroll-margin-top: calc(var(--top-h) + 16px);
}

/* ============================================================
   Scroll Reveal（prefers-reduced-motion 下关闭）
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   响应式断点
   ============================================================ */

/* 平板 */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
  }
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .top-search .search-form input {
    width: 110px;
  }
}

/* 手机 */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .top-bar {
    padding: 0 12px;
    gap: 8px;
  }
  .top-nav { display: none; }
  .search-form input { width: 90px; }

  .hero-wrap { height: 70vh; }

  .hero-slot-1 { width: 60%; left: -4%; }
  .hero-slot-2 { width: 55%; right: -4%; }

  .main-content { padding: 20px 14px 32px; }

  .aside-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .aside-nav-list { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .footer-brand-sec,
  .footer-links-sec { padding-left: 14px; padding-right: 14px; }
  .footer-bottom-sec { padding: 14px; }

  .bottom-nav ul li a { padding: 2px 2px; }
  .bn-label { font-size: .55rem; max-width: 44px; }
}

@media (max-width: 380px) {
  .footer-cols { grid-template-columns: 1fr; }
  .bn-label { display: none; }
  .bn-icon { font-size: 1.4rem; }
}
