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

/* ===== 基础变量 ===== */
:root {
  --c-primary: #56228b;
  --c-primary-light: #7a3fba;
  --c-primary-dark: #3b176b;
  --c-secondary: #8b4513;
  --c-secondary-light: #b85d1e;
  --c-ink: #1f1726;
  --c-ink-soft: #3d2e4a;
  --c-bg: #f5f0eb;
  --c-bg-soft: #ede6dd;
  --c-bg-card: #faf7f3;
  --c-border: #d4c4b0;
  --c-text: #2a1e33;
  --c-text-muted: #6b5a7a;
  --c-white: #ffffff;
  --c-accent-line: #8b4513;

  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-heading: 'Outfit', 'Rubik', system-ui, sans-serif;
  --font-body: 'Rubik', 'Outfit', system-ui, sans-serif;

  --shadow-soft: 0 4px 20px rgba(86, 34, 139, 0.10);
  --shadow-card: 0 2px 12px rgba(31, 23, 38, 0.08);
  --shadow-hover: 0 8px 32px rgba(86, 34, 139, 0.18);

  --max-w: 1120px;
  --nav-h: 56px;
  --brand-h: 64px;
  --announce-h: 40px;
  --sticky-offset: calc(var(--announce-h) + var(--brand-h) + var(--nav-h));
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  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; }

/* ===== 公告条 ===== */
.announce-bar {
  background: linear-gradient(90deg, var(--c-primary-dark) 0%, var(--c-primary) 60%, var(--c-secondary) 100%);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  padding: 0 1rem;
  height: var(--announce-h);
  line-height: var(--announce-h);
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 100;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Header 品牌行 ===== */
.site-header {
  position: sticky;
  top: var(--announce-h);
  z-index: 99;
  background: var(--c-ink);
  box-shadow: 0 2px 16px rgba(31,23,38,0.25);
}

.brand-row {
  background: var(--c-ink);
  border-bottom: 1px solid rgba(86,34,139,0.3);
  height: var(--brand-h);
  display: flex;
  align-items: center;
}

.brand-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  padding: 0.5rem 0;
  min-height: 44px;
}

.brand-logo {
  height: 38px;
  width: auto;
  border-radius: var(--radius-sm);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-left: auto;
  display: none;
}

/* ===== 导航行 ===== */
.nav-row {
  background: var(--c-primary-dark);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.main-nav {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-nav > ol {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.main-nav > ol::-webkit-scrollbar { display: none; }

.main-nav > ol > li > a {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 0.85rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  min-height: 44px;
}

.main-nav > ol > li > a:hover,
.main-nav > ol > li > a:focus {
  background: rgba(255,255,255,0.12);
  color: var(--c-white);
  outline: none;
}

.main-nav > ol > li:first-child > a {
  color: var(--c-white);
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  background: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-margin-top: var(--sticky-offset);
}

/* 点阵底纹 */
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(86,34,139,0.35) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* 有机 blob */
.hero-blob {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.hero-blob--1 {
  width: min(560px, 80vw);
  top: -80px;
  right: -100px;
  opacity: 0.8;
}
.hero-blob--2 {
  width: min(360px, 60vw);
  bottom: 40px;
  left: -60px;
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4rem 1.5rem 6rem;
  max-width: 680px;
  margin: 0 auto;
}

.hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 16px rgba(31,23,38,0.5);
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.4rem;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  color: var(--c-white);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  letter-spacing: 0.04em;
  box-shadow: 0 4px 24px rgba(86,34,139,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 48px;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(86,34,139,0.5);
}

/* 圆弧底边 */
.hero-arc {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}
.hero-arc svg {
  width: 100%;
  height: 80px;
}

/* ===== 主内容区 ===== */
.page-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.content-with-aside {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

/* ===== Article / Section ===== */
.main-article {
  min-width: 0;
}

/* 正文排版 */
.content-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--c-primary);
  margin: 2.8rem 0 0.6rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--c-secondary);
}

.content-section h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  margin: 1.8rem 0 0.5rem;
}

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

.content-section ul,
.content-section ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}
.content-section ul { list-style: disc; }
.content-section ol { list-style: decimal; }

.content-section li {
  line-height: 1.7;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.content-section a {
  color: var(--c-primary-light);
  text-decoration: underline;
  text-decoration-color: rgba(86,34,139,0.35);
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.content-section a:hover { color: var(--c-secondary); }

.content-section strong {
  font-weight: 700;
  color: var(--c-ink-soft);
}

/* div 内部 div 之间分隔 */
.content-section > div {
  padding: 2rem 0;
  border-bottom: 1px solid var(--c-bg-soft);
}
.content-section > div:last-child { border-bottom: none; }

/* scroll margin for anchor sections */
div[id] {
  scroll-margin-top: var(--sticky-offset);
}

/* ===== 侧边栏 ===== */
.page-aside {
  position: sticky;
  top: calc(var(--sticky-offset) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.aside-card {
  background: var(--c-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  border-bottom: 4px solid var(--c-accent-line);
  padding: 1.4rem 1.2rem;
  box-shadow: var(--shadow-card);
}

.aside-title,
.aside-card-h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
}

.aside-card .subtitle {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aside-nav-list li a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-ink-soft);
  transition: background 0.18s, color 0.18s;
  min-height: 40px;
}
.aside-nav-list li a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
  margin-right: 0.65rem;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.18s;
}
.aside-nav-list li a:hover {
  background: rgba(86,34,139,0.08);
  color: var(--c-primary);
}
.aside-nav-list li a:hover::before { opacity: 1; }

.aside-tip-text {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.55;
  margin-top: 0.5rem;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-ink);
  color: rgba(255,255,255,0.75);
  margin-top: 2rem;
}

.footer-brand-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  min-height: 44px;
  padding: 0.25rem 0;
}

.footer-brand-link .brand-logo,
.footer-brand-link img {
  height: 36px;
  width: auto;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-white);
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  max-width: 320px;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-nav-list li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  transition: color 0.18s;
  min-height: 40px;
}
.footer-nav-list li a:hover { color: var(--c-primary-light); }

/* 联系区域 */
.footer-contact-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-contact-inner {
  background: rgba(86,34,139,0.15);
  border-radius: var(--radius-md);
  border: 1px solid rgba(86,34,139,0.3);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-contact-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  white-space: nowrap;
}

.footer-contact-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  flex: 1;
}

.footer-email a {
  color: var(--c-primary-light);
  text-decoration: underline;
  font-size: 0.9rem;
}

/* 版权行 */
.footer-copy-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .main-article,
  .page-aside,
  .hero-content {
    animation: fadeInUp 0.55s ease both;
  }
  .page-aside { animation-delay: 0.15s; }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .aside-nav-list li {
    animation: staggerIn 0.4s ease both;
  }
  .aside-nav-list li:nth-child(1) { animation-delay: 0.05s; }
  .aside-nav-list li:nth-child(2) { animation-delay: 0.10s; }
  .aside-nav-list li:nth-child(3) { animation-delay: 0.15s; }
  .aside-nav-list li:nth-child(4) { animation-delay: 0.20s; }
  .aside-nav-list li:nth-child(5) { animation-delay: 0.25s; }
  .aside-nav-list li:nth-child(6) { animation-delay: 0.30s; }
  .aside-nav-list li:nth-child(7) { animation-delay: 0.35s; }

  @keyframes staggerIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .main-nav > ol > li > a,
  .hero-cta,
  .aside-card {
    transition-property: background, color, transform, box-shadow;
    transition-duration: 0.2s;
    transition-timing-function: ease;
  }
  .aside-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
  }
}

/* ===== 响应式 ===== */
@media (min-width: 900px) {
  .brand-tagline { display: block; }
}

@media (max-width: 900px) {
  .content-with-aside {
    grid-template-columns: 1fr;
  }
  .page-aside {
    position: static;
  }
  .footer-brand-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  :root {
    --brand-h: 56px;
    --nav-h: 48px;
    --announce-h: 36px;
  }

  .announce-bar {
    font-size: 0.78rem;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .brand-link {
    min-height: 44px;
  }

  .main-nav > ol > li > a {
    padding: 0 0.55rem;
    font-size: 0.82rem;
    min-height: 44px;
  }

  .hero-content {
    padding: 3rem 1rem 5rem;
  }

  .hero-h1 {
    font-size: 1.75rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-cta {
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
  }

  .page-main {
    padding: 2rem 1rem 3rem;
  }

  .content-section h2 {
    font-size: 1.25rem;
  }

  .footer-contact-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.2rem;
  }
}

/* ===== 工具 ===== */
.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;
}

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