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

/* ===== 变量 ===== */
:root {
  --c-primary: #1A2E2A;
  --c-accent: #8B1A1A;
  --c-bg: #F2EDE4;
  --c-bg-dark: #111a18;
  --c-text: #1A2E2A;
  --c-text-light: #F2EDE4;
  --c-border: #1A2E2A;
  --c-muted: #4a6560;
  --c-accent-light: #c23a3a;
  --nav-width: 220px;
  --font-display: 'Outfit', 'Work Sans', system-ui, sans-serif;
  --font-body: 'Work Sans', 'Outfit', system-ui, sans-serif;
  --radius: 4px;
  --border-w: 3px;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-bg);
  color: var(--c-text);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  background: var(--c-bg);
}

/* ===== 布局骨架 ===== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== 左侧固定导航 ===== */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--c-primary);
  color: var(--c-text-light);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  z-index: 100;
  overflow-y: auto;
  border-right: var(--border-w) solid var(--c-accent);
}

.nav-brand {
  margin-bottom: 2.5rem;
}

.brand-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-text-light);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: contain;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  flex: 1;
}

.nav-list li {
  counter-increment: nav-count;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(242, 237, 228, 0.75);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  min-height: 44px;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.nav-link::before {
  content: counter(nav-count, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 300;
  opacity: 0.5;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--c-text-light);
  background: rgba(139, 26, 26, 0.25);
  border-color: var(--c-accent);
  outline: none;
}

.nav-decor {
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.decor-line {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent) 0%, transparent 100%);
  border-radius: 2px;
}

/* ===== 内容区 ===== */
.content-area {
  margin-left: var(--nav-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== Hero ===== */
.hero-section {
  display: flex;
  align-items: center;
  min-height: 70vh;
  background: var(--c-primary);
  position: relative;
  overflow: hidden;
  padding: 4rem 3rem 4rem 3rem;
  gap: 3rem;
}

.hero-figure {
  position: relative;
  flex: 1 1 45%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  object-fit: cover;
  border-radius: var(--radius);
  border: var(--border-w) solid var(--c-accent);
  display: block;
  position: relative;
  z-index: 1;
}

.hero-bg-text {
  position: absolute;
  bottom: -0.15em;
  left: -0.05em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 9rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(139, 26, 26, 0.22);
  text-stroke: 1px rgba(139, 26, 26, 0.22);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.03em;
  user-select: none;
}

.hero-aside {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}

.eyebrow-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent-light);
  border: 1px solid var(--c-accent);
  padding: 0.3em 0.75em;
  border-radius: var(--radius);
  background: rgba(139, 26, 26, 0.12);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--c-text-light);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtitle,
.hero-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(242, 237, 228, 0.75);
  line-height: 1.7;
  max-width: 38em;
}

/* ===== CTA 按钮 ===== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.75em 1.75em;
  min-height: 48px;
  border-radius: var(--radius);
  border: var(--border-w) solid var(--c-accent);
  background: var(--c-accent);
  color: var(--c-text-light);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform 0.2s;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  background: var(--c-accent-light);
  border-color: var(--c-accent-light);
  color: #fff;
  transform: translateY(-2px);
  outline: none;
}

.cta-btn--ghost {
  background: transparent;
  color: var(--c-accent-light);
  border-color: var(--c-accent);
}

.cta-btn--ghost:hover,
.cta-btn--ghost:focus-visible {
  background: var(--c-accent);
  color: var(--c-text-light);
}

/* ===== 正文区域（page.content 插入） ===== */
.page-content {
  background: var(--c-bg);
}

/* div 样式 */
.page-content div,
main > .page-content > div {
  scroll-margin-top: 2rem;
}

/* 通用 div 内容样式 */
.page-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--c-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.page-content h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--c-accent);
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

.page-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 1rem;
  max-width: 68ch;
}

.page-content ul,
.page-content ol {
  padding-left: 1.5em;
  margin-bottom: 1rem;
}

.page-content li {
  line-height: 1.7;
  margin-bottom: 0.35em;
  font-size: 1rem;
}

.page-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.page-content a:hover {
  color: var(--c-accent-light);
}

/* 内容 div 间隔与装饰 */
.page-content > div {
  padding: 4rem 3rem;
  border-bottom: 1px solid rgba(26, 46, 42, 0.1);
  position: relative;
  scroll-margin-top: 2rem;
}

.page-content > div:nth-child(even) {
  background: rgba(26, 46, 42, 0.04);
}

/* figure/aside 交错布局（正文容器内）*/
.page-content > div > figure,
.page-content > div > aside {
  margin-top: 2rem;
}

/* ===== Kinetic 动效 ===== */
@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes typeReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(139, 26, 26, 0.0); }
  50% { text-shadow: 0 0 30px rgba(139, 26, 26, 0.35); }
}

.kinetic-title {
  animation: fadeUpIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both,
             glowPulse 4s ease-in-out 1.2s infinite;
}

.hero-eyebrow {
  animation: slideInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.hero-desc {
  animation: fadeUpIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.hero-aside .cta-btn {
  animation: fadeUpIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.hero-figure {
  animation: fadeUpIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* Scroll reveal */
.reveal-elem {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-elem.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-primary);
  color: var(--c-text-light);
  margin-top: 0;
}

.footer-inner {
  padding: 3rem 3rem 1.5rem;
}

.footer-cta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(242, 237, 228, 0.15);
}

.footer-cta-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--c-text-light);
  max-width: 36em;
  line-height: 1.4;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-text-light);
  margin-bottom: 0.25rem;
}

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(242, 237, 228, 0.55);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.footer-col small {
  font-size: 0.875rem;
  color: rgba(242, 237, 228, 0.65);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-nav-link {
  color: rgba(242, 237, 228, 0.65);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}

.footer-nav-link:hover {
  color: var(--c-text-light);
}

.footer-copy {
  border-top: 1px solid rgba(242, 237, 228, 0.1);
  padding-top: 1.25rem;
  text-align: center;
}

.footer-copy small {
  font-size: 0.8rem;
  color: rgba(242, 237, 228, 0.45);
  line-height: 1.6;
}

/* ===== 区块分隔标记（div 序号装饰）===== */
.page-content > div::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--c-accent);
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

/* ===== 卡片（若正文内有）===== */
.page-content .card,
.page-content [class*="card"] {
  border: var(--border-w) solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
  transition: border-color var(--transition);
  box-shadow: none;
}

.page-content .card:hover,
.page-content [class*="card"]:hover {
  border-color: var(--c-accent);
}

/* ===== 表格 ===== */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.page-content th,
.page-content td {
  border: 1px solid rgba(26, 46, 42, 0.15);
  padding: 0.65rem 1rem;
  text-align: left;
}

.page-content th {
  background: var(--c-primary);
  color: var(--c-text-light);
  font-family: var(--font-display);
  font-weight: 600;
}

/* ===== scroll-margin-top for anchor sections ===== */
div[id] {
  scroll-margin-top: 1.5rem;
}

/* ===== 辅助 ===== */
img { max-width: 100%; height: auto; display: block; }
a { transition: color 0.2s; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  :root { --nav-width: 180px; }

  .hero-section {
    padding: 3rem 2rem;
    gap: 2rem;
  }

  .page-content > div {
    padding: 3rem 2rem;
  }

  .footer-inner {
    padding: 2.5rem 2rem 1.25rem;
  }

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

@media (max-width: 700px) {
  :root { --nav-width: 0px; }

  .site-wrapper {
    flex-direction: column;
  }

  .side-nav {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    border-right: none;
    border-bottom: var(--border-w) solid var(--c-accent);
    gap: 0.5rem;
    align-items: center;
  }

  .nav-brand {
    margin-bottom: 0;
    margin-right: auto;
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: none;
    width: 100%;
    margin-top: 0.5rem;
  }

  .nav-list li {
    flex: none;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
    min-height: 40px;
  }

  .nav-link::before {
    display: none;
  }

  .nav-decor {
    display: none;
  }

  .content-area {
    margin-left: 0;
  }

  .hero-section {
    flex-direction: column-reverse;
    min-height: auto;
    padding: 2.5rem 1.25rem;
    gap: 2rem;
  }

  .hero-figure {
    min-height: 200px;
    width: 100%;
  }

  .hero-aside {
    align-items: flex-start;
  }

  .hero-bg-text {
    font-size: clamp(3rem, 20vw, 6rem);
  }

  .page-content > div {
    padding: 2.5rem 1.25rem;
  }

  .footer-inner {
    padding: 2rem 1.25rem 1rem;
  }

  .footer-cta-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 375px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.45rem 0.5rem;
  }
}

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

  .reveal-elem,
  .stagger-item {
    opacity: 1;
    transform: none;
  }
}

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