@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ===== 变量 ===== */
:root {
  --c-bg: #1A1A2E;
  --c-accent: #E94560;
  --c-light: #F5F5F5;
  --c-bg2: #16213E;
  --c-bg3: #0F3460;
  --c-text: #F5F5F5;
  --c-text-muted: rgba(245,245,245,0.55);
  --c-border: rgba(245,245,245,0.12);
  --nav-w: 220px;
  --font-mono: 'Share Tech Mono', 'Fira Code', 'Courier New', monospace;
  --font-body: 'Fira Code', 'Share Tech Mono', monospace;
  --radius: 4px;
  --transition: 150ms ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-light); }
ul, ol { list-style: none; }

/* ===== 布局根 ===== */
.layout-root {
  display: flex;
  min-height: 100vh;
}

/* ===== 左侧导航 ===== */
.sidenav {
  width: var(--nav-w);
  min-height: 100vh;
  background: var(--c-bg2);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

/* details 默认箭头隐藏 */
.sidenav > summary { list-style: none; }
.sidenav > summary::-webkit-details-marker { display: none; }

.sidenav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  min-height: 64px;
}

.brand-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-accent);
  background: var(--c-bg3);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.brand-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius);
}

.sidenav-menu {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 0;
}

.sidenav-menu li a {
  display: block;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-text-muted);
  line-height: 1.4;
  transition: color var(--transition), background var(--transition);
  border-left: 2px solid transparent;
  min-height: 40px;
}

.sidenav-menu li a:hover {
  color: var(--c-light);
  background: rgba(233,69,96,0.08);
  border-left-color: var(--c-accent);
}

.sidenav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem;
  padding: 0.75rem 1rem;
  background: var(--c-accent);
  color: var(--c-light);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: var(--radius);
  text-align: center;
  transition: background var(--transition);
  min-height: 40px;
}

.sidenav-cta:hover {
  background: #c73652;
  color: var(--c-light);
}

/* ===== 页面主体 ===== */
.page-body {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== Hero - 首页满屏 ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--c-bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-bg--dim .hero-bg-img {
  opacity: 0.12;
}

.hero-deco-text {
  position: absolute;
  bottom: -0.1em;
  left: 0;
  right: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 14rem);
  color: rgba(233,69,96,0.06);
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
  z-index: 1;
  pointer-events: none;
  letter-spacing: -0.04em;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.hero-h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-light);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1rem;
  color: var(--c-text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: var(--c-accent);
  color: var(--c-light);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  min-height: 44px;
}

.btn-primary:hover {
  background: #c73652;
  color: var(--c-light);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--c-light);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition);
  min-height: 44px;
}

.btn-outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* ===== 内页 Hero ===== */
.page-hero--inner,
.page-hero--faq,
.page-hero--about,
.page-hero--contact,
.page-hero--plain {
  position: relative;
  background: var(--c-bg2);
  border-bottom: 1px solid var(--c-border);
  padding: 4rem 2rem 3rem;
  overflow: hidden;
}

.page-hero--about {
  background: var(--c-bg3);
}

.inner-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.inner-h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-light);
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb a {
  color: var(--c-text-muted);
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--c-accent); }

/* ===== eyebrow / small 眉题 ===== */
.eyebrow,
small.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.5rem;
}

/* ===== 内容区布局 ===== */
.content-section {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ===== 侧边栏 aside ===== */
.page-aside {
  width: 200px;
  min-width: 180px;
  flex-shrink: 0;
  background: var(--c-bg2);
  border-right: 1px solid var(--c-border);
  padding: 2rem 1rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: calc(100vh - 200px);
}

.aside-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}

.aside-links li a {
  display: block;
  padding: 0.5rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-muted);
  transition: color var(--transition);
  border-left: 2px solid transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-links li a:hover {
  color: var(--c-accent);
  border-left-color: var(--c-accent);
}

.aside-date {
  margin-top: 1.5rem;
  font-size: 0.72rem;
  color: var(--c-text-muted);
}

/* ===== 内容主区 ===== */
.content-main {
  flex: 1;
  padding: 2.5rem 2.5rem;
  max-width: 860px;
  min-width: 0;
}

/* ===== 正文内容 ===== */
.page-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
}

.page-content h2 {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-light);
  margin: 2rem 0 1rem;
}

.page-content h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-light);
  margin: 1.5rem 0 0.75rem;
}

.page-content p {
  margin-bottom: 1.1rem;
  color: rgba(245,245,245,0.85);
}

.page-content ul, .page-content ol {
  margin: 0.75rem 0 1rem 1.25rem;
  list-style: disc;
}

.page-content ol { list-style: decimal; }

.page-content li {
  margin-bottom: 0.5rem;
  color: rgba(245,245,245,0.85);
}

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

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

.page-content strong { color: var(--c-light); font-weight: 700; }

.page-content code {
  font-family: var(--font-mono);
  background: var(--c-bg3);
  padding: 0.15em 0.4em;
  border-radius: var(--radius);
  font-size: 0.88em;
  color: var(--c-accent);
}

/* ===== 日期标签 ===== */
.pub-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-muted);
  display: inline-block;
  margin-top: 0.25rem;
}

/* ===== 特色列表（首页）===== */
.feat-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}

.feat-section h2 {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--c-light);
}

.feat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
}

.feat-card a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
  background: var(--c-bg2);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  transition: border-color var(--transition), background var(--transition);
  color: var(--c-text);
}

.feat-card a:hover {
  border-color: var(--c-accent);
  background: rgba(233,69,96,0.06);
}

.feat-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-accent);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.feat-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-light);
  line-height: 1.3;
}

.feat-desc {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.feat-arrow {
  margin-top: auto;
  font-size: 1rem;
  color: var(--c-accent);
  transition: transform var(--transition);
}

.feat-card a:hover .feat-arrow {
  transform: translateX(4px);
}

/* ===== 案例列表 ===== */
.cases-block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}

.cases-block h2 {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--c-light);
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}

.case-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--c-bg2);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  transition: border-color var(--transition), background var(--transition);
}

.case-item a:hover {
  border-color: var(--c-accent);
  background: rgba(233,69,96,0.06);
}

.case-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-accent);
  min-width: 28px;
  flex-shrink: 0;
}

.case-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.case-info strong {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-light);
}

.case-info small {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  line-height: 1.4;
}

.case-item time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-text-muted);
  flex-shrink: 0;
}

/* ===== FAQ 内容 ===== */
.faq-intro {
  margin-bottom: 1.5rem;
}

.faq-intro h2 {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-light);
}

.faq-content {
  counter-reset: faq-counter;
}

/* ===== 关于页统计块 ===== */
.about-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 100px;
  padding: 1.25rem 1rem;
  background: var(--c-bg3);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  text-align: center;
  border-left: 3px solid var(--c-accent);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--c-text-muted);
}

/* ===== 联系页卡片 ===== */
.contact-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  padding: 1.5rem 1.25rem;
  background: var(--c-bg2);
  border-radius: var(--radius);
  border-top: 3px solid var(--c-accent);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--c-accent);
  line-height: 1;
}

.contact-card strong {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-light);
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ===== 隐私页 ===== */
.privacy-notice {
  margin-bottom: 1.5rem;
}

.privacy-notice h2 {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-light);
  margin-bottom: 0.5rem;
}

.privacy-notice p {
  font-size: 0.88rem;
  color: var(--c-text-muted);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-bg2);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2.5rem;
  background: var(--c-bg3);
  flex-wrap: wrap;
}

.footer-cta-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-light);
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-muted);
  flex-wrap: wrap;
}

.footer-copy a {
  color: var(--c-text-muted);
  transition: color var(--transition);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-copy a:hover { color: var(--c-accent); }

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .feat-card a,
  .case-item a,
  .sidenav-menu li a {
    transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
  }

  .feat-list .feat-card {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 300ms ease forwards;
  }

  .feat-list .feat-card:nth-child(1) { animation-delay: 60ms; }
  .feat-list .feat-card:nth-child(2) { animation-delay: 120ms; }
  .feat-list .feat-card:nth-child(3) { animation-delay: 180ms; }
  .feat-list .feat-card:nth-child(4) { animation-delay: 240ms; }
  .feat-list .feat-card:nth-child(5) { animation-delay: 300ms; }
  .feat-list .feat-card:nth-child(6) { animation-delay: 360ms; }

  .case-list .case-item {
    opacity: 0;
    transform: translateX(-12px);
    animation: fadeRight 280ms ease forwards;
  }

  .case-list .case-item:nth-child(1) { animation-delay: 50ms; }
  .case-list .case-item:nth-child(2) { animation-delay: 100ms; }
  .case-list .case-item:nth-child(3) { animation-delay: 150ms; }
  .case-list .case-item:nth-child(4) { animation-delay: 200ms; }
  .case-list .case-item:nth-child(5) { animation-delay: 250ms; }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeRight {
    to { opacity: 1; transform: translateX(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

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

  .content-main { padding: 1.75rem 1.25rem; }
  .page-aside { width: 160px; min-width: 140px; }
}

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

  .layout-root { flex-direction: column; }

  .sidenav {
    width: 100%;
    min-height: auto;
    position: relative;
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }

  .sidenav[open] .sidenav-menu {
    display: flex;
  }

  .sidenav:not([open]) .sidenav-menu {
    display: none;
  }

  .sidenav-brand {
    justify-content: flex-start;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }

  .sidenav-brand::after {
    content: '菜单';
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--c-text-muted);
    margin-left: auto;
  }

  .sidenav-menu {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .sidenav-menu li a {
    padding: 0.5rem 0.75rem;
    border-left: none;
    border-radius: var(--radius);
    font-size: 0.75rem;
    min-height: 40px;
  }

  .sidenav-cta {
    margin: 0.5rem;
    align-self: flex-start;
  }

  .page-body { margin-left: 0; }

  .hero-section { min-height: 100svh; }
  .hero-h1 { font-size: clamp(1.6rem, 7vw, 2.5rem); }
  .hero-content { padding: 1.5rem 1rem; }
  .hero-deco-text { font-size: clamp(3rem, 15vw, 8rem); }

  .content-section { flex-direction: column; }

  .page-aside {
    width: 100%;
    min-height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    padding: 1.25rem 1rem;
  }

  .aside-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .aside-links li a {
    border-left: none;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    padding: 0.4rem 0.75rem;
    min-height: 40px;
  }

  .content-main { padding: 1.25rem 1rem; }

  .feat-list { grid-template-columns: 1fr; }

  .about-stats { gap: 0.5rem; }
  .stat-item { min-width: 80px; }

  .contact-types { grid-template-columns: 1fr; }

  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1rem;
  }

  .footer-copy { padding: 1rem; gap: 1rem; }

  .page-hero--inner,
  .page-hero--faq,
  .page-hero--about,
  .page-hero--contact,
  .page-hero--plain {
    padding: 2.5rem 1rem 2rem;
  }
}

@media (max-width: 400px) {
  .hero-h1 { font-size: 1.5rem; }
  .inner-h1 { font-size: 1.3rem; }
  .feat-card a { padding: 1rem; }
}
