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

/* ===== 基础变量 ===== */
:root {
  --c-dark: #1B3A2D;
  --c-gold: #C9A84C;
  --c-cream: #F4F0E6;
  --c-dark-80: rgba(27,58,45,0.85);
  --c-dark-60: rgba(27,58,45,0.6);
  --c-gold-20: rgba(201,168,76,0.2);
  --c-gold-40: rgba(201,168,76,0.4);
  --c-cream-80: rgba(244,240,230,0.9);
  --font-title: 'Amatic SC', 'ZCOOL KuaiLe', cursive;
  --font-body: 'Cabin', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --nav-h: 64px;
  --sticky-h: 48px;
  --radius: 0;
  --transition: 0.3s ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-dark);
  color: var(--c-cream);
}
body {
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  background: var(--c-dark);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-cream); }
ul, menu { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.2; }

/* ===== 滚动边距（吸顶导航补偿） ===== */
div[id] {
  scroll-margin-top: calc(var(--nav-h) + var(--sticky-h) + 12px);
}

/* ===== 站点包装 ===== */
.site-wrapper { position: relative; }

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--c-dark-80);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-gold-40);
}

/* details/summary 导航结构 */
.nav-details { position: relative; }
.nav-details[open] .nav-mobile-menu { display: flex; }
.nav-summary {
  display: block;
  list-style: none;
  cursor: default;
}
.nav-summary::-webkit-details-marker { display: none; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 24px;
  gap: 16px;
}

.nav-segment {
  display: flex;
  align-items: center;
  flex: 1;
}
.nav-left { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }

.nav-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.brand-link { display: flex; align-items: center; }
.brand-logo { height: 40px; width: auto; }
.brand-text {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  color: var(--c-gold);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-menu li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-cream-80);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-menu li a:hover {
  color: var(--c-gold);
  border-bottom-color: var(--c-gold);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--c-gold);
  color: var(--c-dark) !important;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-bottom: 2px solid transparent !important;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-cta:hover {
  background: #d9b85a;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--c-gold-40);
  cursor: pointer;
  padding: 10px;
  flex-shrink: 0;
}
.toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-gold);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--c-dark);
  border-top: 1px solid var(--c-gold-40);
  padding: 8px 0;
}
.nav-mobile-menu li a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  font-size: 16px;
  color: var(--c-cream);
  border-left: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.nav-mobile-menu li a:hover {
  color: var(--c-gold);
  border-left-color: var(--c-gold);
  background: var(--c-gold-20);
}

/* 粘性锚点条 */
.sticky-anchors {
  background: var(--c-dark);
  border-bottom: 1px solid var(--c-gold-20);
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-anchors::-webkit-scrollbar { display: none; }
.sticky-anchors ul {
  display: flex;
  align-items: center;
  height: var(--sticky-h);
  padding: 0 16px;
  gap: 0;
  white-space: nowrap;
  min-width: max-content;
}
.sticky-anchors ul li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 13px;
  color: rgba(244,240,230,0.6);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.sticky-anchors ul li a:hover {
  color: var(--c-gold);
  border-bottom-color: var(--c-gold);
}
.sticky-anchors ul li a.active {
  color: var(--c-gold);
  border-bottom-color: var(--c-gold);
}

/* ===== 视差英雄区 ===== */
.hero-scene {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + var(--sticky-h));
}

.parallax-layer {
  position: absolute;
  inset: -20% 0;
  will-change: transform;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.layer-bg {
  background: radial-gradient(ellipse at 30% 60%, rgba(27,58,45,1) 0%, #0d1f18 100%);
  z-index: 1;
}
.layer-mid {
  background:
    radial-gradient(circle at 70% 30%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(201,168,76,0.06) 0%, transparent 50%);
  z-index: 2;
}
.layer-front {
  background: none;
  z-index: 3;
  pointer-events: none;
}
.layer-front::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--c-dark));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-icon {
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.5));
  animation: hero-pulse 3s ease-in-out infinite;
}
@keyframes hero-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 20px rgba(201,168,76,0.5)); }
  50% { transform: scale(1.05) rotate(3deg); filter: drop-shadow(0 0 32px rgba(201,168,76,0.8)); }
}

.hero-h1 {
  font-family: var(--font-title);
  font-size: clamp(48px, 10vw, 88px);
  font-weight: 700;
  color: var(--c-cream);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  letter-spacing: 0.05em;
}

.hero-desc {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(244,240,230,0.8);
  max-width: 560px;
  line-height: 1.6;
}

.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 36px;
  background: var(--c-gold);
  color: var(--c-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(201,168,76,0.3);
}
.btn-hero-cta:hover {
  background: #d9b85a;
  color: var(--c-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,76,0.5);
}

/* ===== 主内容区 ===== */
.site-main {
  position: relative;
  z-index: 10;
  background: var(--c-dark);
}

.content-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "aside figure"
    "aside body";
  gap: 0 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 32px 80px;
}

/* aside 在左侧 */
.content-aside {
  grid-area: aside;
  position: sticky;
  top: calc(var(--nav-h) + var(--sticky-h) + 24px);
  align-self: start;
  border: 1px solid var(--c-gold-40);
  padding: 28px 24px;
  background: rgba(27,58,45,0.4);
}
.aside-inner h2 {
  font-size: 28px;
  color: var(--c-gold);
  margin-bottom: 6px;
}
.aside-inner .subtitle {
  font-size: 13px;
  color: rgba(244,240,230,0.5);
  margin-bottom: 20px;
  line-height: 1.4;
}
.aside-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aside-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--c-cream-80);
  line-height: 1.4;
}
.highlight-icon { flex-shrink: 0; }

/* figure 装饰 */
.content-figure {
  grid-area: figure;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-bottom: 1px solid var(--c-gold-20);
  margin-bottom: 32px;
}
.figure-decoration {
  opacity: 0.6;
  animation: figure-rotate 20s linear infinite;
}
@keyframes figure-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.figure-caption {
  margin-top: 16px;
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--c-gold);
  letter-spacing: 0.1em;
  text-align: center;
}

/* 正文 */
.content-body {
  grid-area: body;
  min-width: 0;
}

/* ===== 正文内 div 样式（page.content 的 div） ===== */
.content-body div {
  padding: 60px 0;
  border-bottom: 1px solid var(--c-gold-20);
  position: relative;
}
.content-body div:last-child { border-bottom: none; }

.content-body div::before {
  content: '';
  position: absolute;
  top: 0;
  left: -32px;
  width: 3px;
  height: 0;
  background: var(--c-gold);
  transition: height 0.6s ease;
}
.content-body div.in-view::before { height: 100%; }

.content-body h1,
.content-body h2 {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 52px);
  color: var(--c-gold);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.content-body h3 {
  font-family: var(--font-title);
  font-size: clamp(24px, 3.5vw, 38px);
  color: var(--c-cream);
  margin-top: 32px;
  margin-bottom: 12px;
}
.content-body h4 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--c-gold);
  margin-top: 24px;
  margin-bottom: 8px;
}
.content-body p {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(244,240,230,0.85);
  margin-bottom: 16px;
  max-width: 720px;
}
.content-body ul,
.content-body ol {
  margin: 0 0 20px 20px;
  color: rgba(244,240,230,0.85);
  line-height: 1.8;
}
.content-body li { margin-bottom: 8px; }
.content-body ul li { list-style: disc; }
.content-body ol li { list-style: decimal; }
.content-body strong { color: var(--c-gold); font-weight: 700; }
.content-body em { color: var(--c-cream); font-style: italic; }
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}
.content-body th {
  background: var(--c-gold-20);
  color: var(--c-gold);
  font-weight: 700;
  padding: 12px 16px;
  border: 1px solid var(--c-gold-40);
  text-align: left;
}
.content-body td {
  padding: 10px 16px;
  border: 1px solid rgba(244,240,230,0.1);
  color: rgba(244,240,230,0.8);
  vertical-align: top;
}
.content-body tr:nth-child(even) td { background: rgba(27,58,45,0.3); }
.content-body blockquote {
  border-left: 3px solid var(--c-gold);
  padding: 16px 24px;
  background: var(--c-gold-20);
  margin: 24px 0;
  font-style: italic;
  color: var(--c-cream-80);
}
.content-body a {
  color: var(--c-gold);
  border-bottom: 1px solid var(--c-gold-40);
  transition: border-color var(--transition), color var(--transition);
}
.content-body a:hover {
  color: var(--c-cream);
  border-bottom-color: var(--c-cream);
}

/* 问答样式 */
.content-body dt {
  font-weight: 700;
  color: var(--c-gold);
  font-size: 17px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.content-body dd {
  margin-left: 16px;
  color: rgba(244,240,230,0.85);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ===== h2 + .subtitle 标题装饰结构 ===== */
h2 + .subtitle,
h2 + p.subtitle,
h2 + p.subhead,
h2 + p.desc,
h2 + p.lead {
  font-size: 15px;
  color: rgba(244,240,230,0.5);
  margin-top: -8px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ===== 进入视图动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* stagger list */
.stagger-list li {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.stagger-list.in-view li { opacity: 1; transform: translateX(0); }
.stagger-list.in-view li:nth-child(1) { transition-delay: 0s; }
.stagger-list.in-view li:nth-child(2) { transition-delay: 0.08s; }
.stagger-list.in-view li:nth-child(3) { transition-delay: 0.16s; }
.stagger-list.in-view li:nth-child(4) { transition-delay: 0.24s; }
.stagger-list.in-view li:nth-child(5) { transition-delay: 0.32s; }
.stagger-list.in-view li:nth-child(6) { transition-delay: 0.40s; }
.stagger-list.in-view li:nth-child(7) { transition-delay: 0.48s; }

/* ===== 页脚 ===== */
.site-footer {
  background: #0d1f18;
  border-top: 2px solid var(--c-gold-40);
  position: relative;
  z-index: 10;
}

.footer-cta-block {
  text-align: center;
  padding: 72px 32px 48px;
  border-bottom: 1px solid var(--c-gold-20);
}
.footer-cta-title {
  font-family: var(--font-title);
  font-size: clamp(36px, 6vw, 64px);
  color: var(--c-cream);
  margin-bottom: 8px;
}
.footer-cta-block .subtitle {
  font-size: 16px;
  color: rgba(244,240,230,0.55);
  margin-bottom: 32px;
}
.btn-footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 40px;
  background: var(--c-gold);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 17px;
  transition: background var(--transition), transform var(--transition);
}
.btn-footer-cta:hover {
  background: #d9b85a;
  color: var(--c-dark);
  transform: translateY(-2px);
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 48px 48px 32px;
  border-bottom: 1px solid var(--c-gold-20);
}

.footer-dl { padding: 0 24px; }
.footer-dl + .footer-dl { border-left: 1px solid var(--c-gold-20); }

.footer-dl dt {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--c-gold);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.footer-dl dd {
  font-size: 14px;
  color: rgba(244,240,230,0.55);
  margin-bottom: 10px;
  line-height: 1.6;
}
.footer-dl dd a {
  color: rgba(244,240,230,0.55);
  transition: color var(--transition);
}
.footer-dl dd a:hover { color: var(--c-gold); }

.footer-bottom {
  padding: 20px 32px;
  text-align: center;
}
.footer-copy {
  font-size: 13px;
  color: rgba(244,240,230,0.3);
}

/* ===== 滚动视差 JS 辅助类 ===== */
.parallax-active .layer-bg { transform: translateY(var(--py-bg, 0px)); }
.parallax-active .layer-mid { transform: translateY(var(--py-mid, 0px)); }
.parallax-active .layer-front { transform: translateY(var(--py-front, 0px)); }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .content-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "aside"
      "figure"
      "body";
    padding: 40px 24px 60px;
    gap: 32px 0;
  }
  .content-aside {
    position: static;
    width: 100%;
  }
  .footer-main {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
  .footer-dl {
    padding: 20px 0;
    border-left: none !important;
    border-bottom: 1px solid var(--c-gold-20);
  }
  .footer-dl:last-child { border-bottom: none; }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
    --sticky-h: 48px;
  }
  .nav-segment { display: none; }
  .nav-brand { padding: 0; }
  .nav-toggle { display: flex; }
  .nav-inner { justify-content: space-between; }

  .sticky-anchors ul li a {
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .hero-h1 { font-size: clamp(40px, 12vw, 64px); }
  .hero-desc { font-size: 15px; }

  .content-figure { padding: 16px; }
  .footer-cta-block { padding: 48px 20px 32px; }
}

@media (max-width: 480px) {
  :root {
    --nav-h: 56px;
    --sticky-h: 48px;
  }
  .content-section { padding: 32px 16px 48px; }
  .footer-main { padding: 24px 16px; }
  .footer-bottom { padding: 16px; }
  .sticky-anchors ul { padding: 0 4px; }
  .sticky-anchors ul li a {
    padding: 0 10px;
    font-size: 12px;
    min-height: 44px;
  }
  .nav-mobile-menu li a {
    min-height: 48px;
    padding: 0 20px;
  }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; }
  .stagger-list li { opacity: 1; transform: none; }
}

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