@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

/* =============================================
   CSS 自定义属性
   ============================================= */
:root {
  --c-purple: #56228b;
  --c-purple-light: #7a3db8;
  --c-purple-pale: #2a1445;
  --c-brown: #8b4513;
  --c-brown-light: #b85a20;
  --c-ink: #1f1726;
  --c-ink-mid: #2e2040;
  --c-ink-soft: #3d2e55;
  --c-surface: #261833;
  --c-surface-2: #301e42;
  --c-surface-3: #3a2555;
  --c-text: #f0eaf8;
  --c-text-muted: #c0a8e0;
  --c-text-dim: #8870aa;
  --c-accent: #d4a0ff;
  --c-accent2: #f0b87a;
  --c-border: rgba(86, 34, 139, 0.35);
  --c-border-warm: rgba(139, 69, 19, 0.35);
  --radius-card: 28px;
  --radius-btn: 50px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --shadow-soft: 0 4px 24px rgba(86, 34, 139, 0.22), 0 1px 4px rgba(0,0,0,0.28);
  --shadow-card: 0 8px 32px rgba(86, 34, 139, 0.18), 0 2px 8px rgba(0,0,0,0.32);
  --shadow-hero: 0 12px 48px rgba(86, 34, 139, 0.35);
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Nunito', 'DM Sans', system-ui, sans-serif;
  --top-bar-h: 38px;
  --header-h: 66px;
  --scroll-offset: 108px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset);
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  background: var(--c-ink);
  color: var(--c-text);
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  background: var(--c-ink);
  color: var(--c-text);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =============================================
   Top Bar
   ============================================= */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--top-bar-h);
  background: linear-gradient(90deg, var(--c-purple) 0%, var(--c-brown) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
}

.top-bar-text {
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.03em;
  text-align: center;
}

/* =============================================
   Header / Nav
   ============================================= */
.site-header {
  position: fixed;
  top: var(--top-bar-h);
  left: 0; right: 0;
  z-index: 190;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 2rem;
  background: rgba(31, 23, 38, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--c-text);
  flex-shrink: 0;
}
.brand-lockup:hover { color: var(--c-accent); }

.brand-logo-img { width: 34px; height: 34px; border-radius: 10px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: inherit;
}

/* ── 导航结构契约：header > nav > p > a ── */
.site-nav { flex: 1; overflow: hidden; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-btn);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover {
  background: var(--c-surface-3);
  color: var(--c-accent);
}

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  padding: 6px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--c-text-muted);
  border-radius: 2px;
  transition: background 0.2s;
}
.nav-toggle:hover span { background: var(--c-accent); }

/* =============================================
   Hero
   ============================================= */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: calc(var(--top-bar-h) + var(--header-h));
  background: var(--c-ink);
}

/* blob 装饰 */
.hero-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.45;
  pointer-events: none;
}
.blob-1 {
  width: 520px; height: 420px;
  background: var(--c-purple);
  top: -80px; left: -100px;
}
.blob-2 {
  width: 420px; height: 380px;
  background: var(--c-brown);
  bottom: -60px; right: -80px;
}

/* 错位双图 */
.hero-collage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-img {
  position: absolute;
  border-radius: var(--radius-card);
  object-fit: cover;
  opacity: 0.28;
}
.hero-img-a {
  width: 42%; max-width: 420px;
  aspect-ratio: 3/4;
  top: 10%; left: 2%;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-hero);
}
.hero-img-b {
  width: 36%; max-width: 360px;
  aspect-ratio: 2/3;
  bottom: 8%; right: 3%;
  transform: rotate(5deg);
  box-shadow: var(--shadow-hero);
}

/* 斜切色带 */
.hero-slash {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(170deg, transparent 40%, var(--c-surface) 40%);
  pointer-events: none;
}

/* 文案居中 */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
  padding: 2rem 2rem 4rem;
}

.hero-h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 24px rgba(86,34,139,0.6);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--c-text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--c-purple) 0%, var(--c-purple-light) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-btn);
  box-shadow: 0 4px 24px rgba(86,34,139,0.5);
  transition: transform 0.22s, box-shadow 0.22s;
  min-height: 50px;
}
.hero-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 36px rgba(86,34,139,0.7);
  color: #fff;
}

/* =============================================
   Main / Content shell
   ============================================= */
.site-main {
  background: var(--c-surface);
  position: relative;
}

/* 正文容器：main > section > figure/aside 交错 契约 */
.content-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
  align-items: start;
}

/* ── Aside 在内容左侧 ── */
.content-aside {
  position: sticky;
  top: calc(var(--top-bar-h) + var(--header-h) + 1.5rem);
  align-self: start;
}

.aside-inner {
  background: var(--c-surface-2);
  border-radius: var(--radius-card);
  padding: 1.6rem 1.4rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-soft);
}

.aside-inner h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--c-accent);
  margin-bottom: 0.3rem;
}

.aside-inner .subtitle {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin-bottom: 1rem;
}

.aside-nav-list { display: flex; flex-direction: column; gap: 0.3rem; }
.aside-nav-list a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-muted);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  display: block;
  transition: background 0.18s, color 0.18s;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.aside-nav-list a:hover {
  background: var(--c-surface-3);
  color: var(--c-accent);
}

.content-body { min-width: 0; }

/* =============================================
   Page.content 内部样式（content-body 下）
   ============================================= */
.content-body section {
  margin-bottom: 3.5rem;
  scroll-margin-top: var(--scroll-offset);
  position: relative;
}

.content-body h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--c-accent);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.content-body h2 + p,
.content-body h2 + .subtitle {
  color: var(--c-text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.content-body h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--c-accent2);
  margin: 1.4rem 0 0.5rem;
}

.content-body p {
  color: var(--c-text-muted);
  margin-bottom: 1rem;
  line-height: 1.75;
  font-size: 1rem;
}

.content-body ul, .content-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}
.content-body ul { list-style: disc; }
.content-body ol { list-style: decimal; }
.content-body li {
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 0.35rem;
}

.content-body a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-body a:hover { color: #fff; }

/* 卡片底部强调线 + 圆角28px */
.content-body .card,
.content-body div,
.content-body .entry {
  background: var(--c-surface-2);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
  border-bottom: 3px solid var(--c-purple);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s, box-shadow 0.22s;
}
.content-body .card:hover,
.content-body div:hover,
.content-body .entry:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(86,34,139,0.32);
}

/* figure 与 aside 在 section 内交错 */
.content-body figure {
  margin: 1.4rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.content-body figcaption {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  text-align: center;
  padding: 0.5rem;
  background: var(--c-surface-2);
}

.content-body aside {
  background: var(--c-ink-mid);
  border-left: 4px solid var(--c-brown);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0;
  color: var(--c-text-muted);
  font-size: 0.93rem;
}

/* 区块分隔带 */
.content-body section + section::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--c-purple) 0%, var(--c-brown) 50%, transparent 100%);
  border-radius: 2px;
  margin-bottom: 3rem;
  opacity: 0.45;
}

/* table */
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}
.content-body th {
  background: var(--c-surface-3);
  color: var(--c-accent);
  font-weight: 700;
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.content-body td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
.content-body tr:last-child td { border-bottom: none; }

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--c-ink);
  border-top: 1px solid var(--c-border);
  padding: 3.5rem 2rem 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--c-accent);
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--c-text);
  margin-bottom: 0.6rem;
}

.footer-brand-desc {
  color: var(--c-text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* address */
.site-footer address {
  font-style: normal;
  margin-bottom: 1.2rem;
}
.site-footer address a {
  color: var(--c-text-muted);
  font-size: 0.88rem;
  word-break: break-all;
}
.site-footer address a:hover { color: var(--c-accent); }

/* subscribe form */
.footer-subscribe {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-subscribe input {
  flex: 1;
  min-width: 140px;
  padding: 0.6rem 1rem;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-btn);
  color: var(--c-text);
  font-size: 0.88rem;
  font-family: var(--font-body);
  min-height: 42px;
}
.footer-subscribe input::placeholder { color: var(--c-text-dim); }
.footer-subscribe input:focus {
  outline: 2px solid var(--c-purple);
  outline-offset: 2px;
}
.footer-subscribe button {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, var(--c-purple), var(--c-purple-light));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  border: none;
  border-radius: var(--radius-btn);
  min-height: 42px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.footer-subscribe button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(86,34,139,0.45);
}

/* footer ul > li > a 契约 */
.footer-col-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-col-links li a {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  padding: 0.35rem 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition: color 0.18s;
}
.footer-col-links li a:hover { color: var(--c-accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--c-text-dim);
}

.footer-bottom-links {
  display: flex;
  gap: 0.5rem;
}
.footer-bottom-links li a {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  padding: 0.3rem 0.6rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: background 0.18s, color 0.18s;
}
.footer-bottom-links li a:hover {
  background: var(--c-surface-2);
  color: var(--c-accent);
}

/* =============================================
   Scroll Reveal 动效
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(.22,.8,.36,1), transform 0.6s cubic-bezier(.22,.8,.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-cta, .content-body .card, .footer-subscribe button { transition: none; }
  html { scroll-behavior: auto; }
}

/* =============================================
   Hover 微动效
   ============================================= */
.aside-nav-list a,
.nav-links a {
  position: relative;
}

/* =============================================
   流线分割带
   ============================================= */
.site-main::before {
  content: '';
  display: block;
  height: 60px;
  background: var(--c-surface);
  clip-path: ellipse(55% 100% at 50% 0%);
  margin-top: -30px;
  pointer-events: none;
}

/* =============================================
   Mobile Nav 展开
   ============================================= */
.site-header.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: fixed;
  top: calc(var(--top-bar-h) + var(--header-h));
  left: 0; right: 0;
  background: rgba(31, 23, 38, 0.98);
  padding: 1.5rem;
  gap: 0.3rem;
  border-bottom: 1px solid var(--c-border);
  z-index: 180;
}

/* =============================================
   Breakpoints
   ============================================= */
@media (max-width: 960px) {
  .content-shell {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
    order: -1;
  }
  .aside-inner {
    padding: 1.2rem;
  }
  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-col-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  :root {
    --scroll-offset: 120px;
  }
  .site-header {
    padding: 0 1rem;
  }
  .site-nav { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open .site-nav {
    display: block;
    position: fixed;
    top: calc(var(--top-bar-h) + var(--header-h));
    left: 0; right: 0;
    background: rgba(31, 23, 38, 0.98);
    padding: 1rem;
    z-index: 180;
    border-bottom: 1px solid var(--c-border);
  }
  .site-header.nav-open .nav-links {
    position: static;
    background: none;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .hero-img-a, .hero-img-b { display: none; }
  .hero-content { padding: 1.5rem 1.2rem 3rem; }
  .hero-h1 { font-size: 1.9rem; }

  .content-shell { padding: 2rem 1.1rem 3rem; gap: 1.5rem; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-col-brand { grid-column: auto; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .top-bar-text { font-size: 0.72rem; }
  .brand-name { font-size: 1rem; }
}

@media (max-width: 420px) {
  html { font-size: 16px; }
  .hero-cta { padding: 0.75rem 1.5rem; font-size: 0.92rem; }
  .footer-subscribe { flex-direction: column; }
  .footer-subscribe input,
  .footer-subscribe button { width: 100%; }
}

/* =============================================
   Section scroll-margin
   ============================================= */
section[id] {
  scroll-margin-top: var(--scroll-offset);
}

/* =============================================
   Organic blob SVG pseudo overlays (subtle texture)
   ============================================= */
.site-footer::before {
  content: '';
  display: block;
  height: 48px;
  background: var(--c-surface);
  clip-path: ellipse(60% 100% at 50% 0%);
  margin-top: -24px;
  pointer-events: none;
}

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