/* =========================================================
   AI 科普站 · 样式表
   说明：纯静态站点，无构建依赖，可直接被浏览器解析
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f6f7fc;
  --color-text: #1b2033;
  --color-text-secondary: #5a6178;
  --color-text-tertiary: #8a90ad;
  --color-primary: #4f46e5;
  --color-primary-strong: #4338ca;
  --color-primary-soft: #eef0fe;
  --color-accent: #7c3aed;
  --color-border: #e3e6f2;
  --color-dark: #0f172a;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(79, 70, 229, 0.14);
  --header-height: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

::selection {
  background: rgba(79, 70, 229, 0.18);
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.container-narrow {
  width: min(780px, 100% - 48px);
  margin-inline: auto;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.main-nav a.is-active {
  color: var(--color-primary);
  font-weight: 500;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- 首屏 Banner ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 52%, #312e81 100%);
}

/* 首屏装饰：柔光斑 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 320px at 12% 8%, rgba(99, 102, 241, 0.35), transparent 65%),
    radial-gradient(480px 300px at 88% 82%, rgba(6, 182, 212, 0.22), transparent 65%);
  pointer-events: none;
}

/* 首屏装饰：点阵网格 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 30%, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 118px 0 104px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- 首屏数据 ---------- */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 56px;
}

.hero-stat dt {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.hero-stat dd {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- 通用板块 ---------- */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(25px, 3.4vw, 33px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 16px;
  color: var(--color-text-secondary);
  max-width: 760px;
  margin-bottom: 44px;
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  margin-bottom: 18px;
}

.card-icon svg {
  width: 23px;
  height: 23px;
}

.card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ---------- 发展时间线 ---------- */
.timeline {
  position: relative;
  margin-left: 8px;
  padding-left: 38px;
  border-left: 2px solid var(--color-border);
}

.timeline li {
  position: relative;
  padding-bottom: 38px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

/* 时间线节点圆点 */
.timeline li::before {
  content: "";
  position: absolute;
  left: -46px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--color-primary);
}

.timeline-year {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 8px;
}

.timeline h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline p {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 720px;
}

/* ---------- 广告位（横幅占位） ---------- */
.ad-slot {
  margin: 8px 0 0;
}

.ad-slot__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 18px 16px;
  text-align: center;
  border: 2px dashed #ccd2ee;
  border-radius: var(--radius-md);
  background: #fafbff;
}

.ad-slot__tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #5b6390;
  background: #edeffb;
  border-radius: 999px;
  padding: 2px 12px;
}

.ad-slot__meta {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.ad-slot__hint {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* ---------- 广告卡片位（工具推荐） ---------- */
.ad-card {
  position: relative;
  background: var(--color-bg);
  border: 2px dashed #ccd2ee;
  border-radius: var(--radius-lg);
  padding: 26px 22px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ad-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: var(--shadow-md);
}

.ad-card__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #5b6390;
  background: #edeffb;
  border-radius: 999px;
  padding: 2px 10px;
}

.ad-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  margin-bottom: 16px;
}

.ad-card__icon svg {
  width: 21px;
  height: 21px;
}

.ad-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ad-card p {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.ad-card__link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-primary);
}

/* ---------- 常见问题 ---------- */
.faq-list {
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 20px 44px 20px 0;
  font-size: 15.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--color-primary);
}

/* 折叠指示图标 */
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item > p {
  padding: 0 0 20px;
  font-size: 14.5px;
  color: var(--color-text-secondary);
  max-width: 720px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 24px;
  padding-top: 56px;
  color: rgba(255, 255, 255, 0.68);
  background: var(--color-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand .brand-name {
  display: block;
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13.5px;
  line-height: 1.8;
  max-width: 340px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.footer-links a {
  font-size: 13.5px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

/* ---------- 滚动入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 响应式适配 ---------- */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 24px 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 12px 10px;
    font-size: 15px;
  }

  .hero-inner {
    padding: 84px 0 76px;
  }

  .hero-stats {
    gap: 18px 40px;
  }

  .section {
    padding: 68px 0;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .container,
  .container-narrow {
    width: calc(100% - 36px);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stat dt {
    font-size: 25px;
  }

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

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline li::before {
    left: -36px;
  }
}
