/* =========================================================
   Aurora — 多页面静态站点 · 本地样式
   设计基调：干净中性冷灰 + 克制冷蓝强调 + 大量留白
   ========================================================= */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --text: #1b2130;
  --text-soft: #5a6478;
  --muted: #8b93a6;
  --border: #e5e9f0;
  --border-strong: #d4dae5;
  --accent: #2f6df6;
  --accent-deep: #1f55d6;
  --accent-soft: #eaf1ff;
  --shadow-sm: 0 2px 8px rgba(27, 33, 48, .05);
  --shadow: 0 8px 28px rgba(27, 33, 48, .07);
  --shadow-hover: 0 16px 40px rgba(27, 33, 48, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --maxw: 1140px;
  --nav-h: 66px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .2px;
}
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #6aa0ff);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  color: var(--text-soft);
  font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link.active { color: var(--accent); background: var(--accent-soft); }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav__toggle span::before { transform: translate(-50%, -7px); }
.nav__toggle span::after { transform: translate(-50%, 5px); }
.nav__toggle.open span { background: transparent; }
.nav__toggle.open span::before { transform: translate(-50%, 0) rotate(45deg); }
.nav__toggle.open span::after { transform: translate(-50%, 0) rotate(-45deg); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
    background .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(47, 109, 246, .28);
}
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------------- Hero（首页） ---------------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto 0;
  height: 520px;
  background:
    radial-gradient(620px 320px at 18% 0%, rgba(47, 109, 246, .12), transparent 60%),
    radial-gradient(520px 300px at 88% 10%, rgba(120, 150, 255, .12), transparent 60%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -.5px;
  font-weight: 800;
  margin-bottom: 18px;
}
.hero p {
  font-size: 18px;
  color: var(--text-soft);
  max-width: 600px;
  margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- 区块标题 ---------------- */
.section { padding: 72px 0; }
.section__head { margin-bottom: 40px; max-width: 620px; }
.section__head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -.4px;
  margin-bottom: 12px;
}
.section__head p { color: var(--text-soft); font-size: 16px; }

/* ---------------- 入口卡片网格 ---------------- */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.entry-card {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .25s var(--ease),
    border-color .22s var(--ease);
}
.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}
.entry-card__icon {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.entry-card__icon svg { width: 26px; height: 26px; }
.entry-card__body h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.entry-card__body p { color: var(--text-soft); font-size: 15px; }
.entry-card__go {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.entry-card__go .arrow { transition: transform .2s var(--ease); }
.entry-card:hover .entry-card__go .arrow { transform: translateX(4px); }

/* ---------------- 子页面 Hero ---------------- */
.page-hero {
  padding: 76px 0 28px;
  position: relative;
}
.page-hero::before {
  content: "";
  position: absolute; inset: -30% 0 auto 0; height: 360px;
  background: radial-gradient(560px 260px at 12% 0%, rgba(47,109,246,.1), transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; }
.breadcrumb {
  font-size: 13px; color: var(--muted); margin-bottom: 14px;
}
.breadcrumb a:hover { color: var(--accent); }
.page-hero h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800; letter-spacing: -.4px; margin-bottom: 12px;
}
.page-hero p { color: var(--text-soft); font-size: 17px; max-width: 600px; }

/* ---------------- 通用卡片网格 ---------------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: 15px; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card__icon svg { width: 24px; height: 24px; }

/* 关于页数据条 */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 8px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.stat__num { font-size: 34px; font-weight: 800; color: var(--accent); letter-spacing: -1px; }
.stat__label { color: var(--text-soft); font-size: 14px; margin-top: 4px; }

/* 博客列表 */
.post {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .25s var(--ease);
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.post__cover {
  height: 160px;
  background: linear-gradient(135deg, #e9f0ff, #dfe9ff);
  display: grid; place-items: center; color: var(--accent);
}
.post__cover svg { width: 40px; height: 40px; opacity: .8; }
.post__body { padding: 22px; }
.post__meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.post__body h3 { font-size: 18px; margin-bottom: 8px; }
.post__body p { color: var(--text-soft); font-size: 14.5px; }
.post__more {
  margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}

/* ---------------- 联系表单 ---------------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.field-error { color: #d64646; font-size: 13px; margin-top: 6px; display: none; }
.form-row.invalid .field-error { display: block; }
.form-row.invalid input,
.form-row.invalid textarea { border-color: #e07a7a; }

.contact-info { display: flex; flex-direction: column; gap: 16px; }
.info-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.info-item__icon {
  width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
}
.info-item__icon svg { width: 22px; height: 22px; }
.info-item h4 { font-size: 15px; margin-bottom: 2px; }
.info-item p { color: var(--text-soft); font-size: 14px; }

.form-note {
  margin-top: 14px; font-size: 14px; color: var(--accent-deep);
  background: var(--accent-soft); padding: 12px 16px; border-radius: var(--radius-sm);
  display: none;
}
.form-note.show { display: block; }

/* ---------------- 页脚 ---------------- */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 0 28px;
}
.footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer__copy { color: var(--muted); font-size: 14px; }
.footer__links { display: flex; gap: 22px; }
.footer__links a { color: var(--text-soft); font-size: 14px; }
.footer__links a:hover { color: var(--accent); }

/* ---------------- 返回顶部 ---------------- */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(47, 109, 246, .35);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  z-index: 40;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent-deep); }

/* ---------------- 入场动画 ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 880px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 680px) {
  .nav__links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 18px 20px;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav__links.open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 12px 14px; }
  .nav__toggle { display: block; }

  .entry-grid { grid-template-columns: 1fr; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 52px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
