/* ============ 基础变量 ============ */
:root {
  --bg: #0a0e17;
  --bg-alt: #0d1320;
  --surface: #121a2a;
  --surface-2: #162034;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(129, 140, 248, 0.45);
  --text: #e8eef7;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #818cf8;
  --primary-strong: #6366f1;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --gradient: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1140px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ 重置 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(129, 140, 248, 0.35); color: #fff; }

/* ============ 背景装饰 ============ */
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
.bg-glow { position: fixed; border-radius: 50%; filter: blur(120px); z-index: -2; pointer-events: none; opacity: .35; }
.bg-glow--1 { width: 540px; height: 540px; top: -180px; left: -140px; background: #4f46e5; }
.bg-glow--2 { width: 480px; height: 480px; top: 340px; right: -180px; background: #0891b2; opacity: .22; }

/* ============ 布局 ============ */
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.section { padding: 110px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,.018) 40%, transparent); }

/* ============ 通用组件 ============ */
.text-gradient {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 14px;
}
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head--row {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; text-align: left;
}
.section-head--row .section-sub { margin-left: 0; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; }
.section-sub { margin-top: 16px; color: var(--text-muted); font-size: 1.02rem; }
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(10px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--gradient); color: #08101f; box-shadow: 0 12px 30px rgba(99,102,241,.28); }
.btn--primary:hover { box-shadow: 0 18px 40px rgba(99,102,241,.42); }
.btn--ghost { background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,.09); border-color: var(--border-hover); }
.btn--outline { border: 1px solid var(--border-hover); color: var(--text); }
.btn--outline:hover { background: rgba(129,140,248,.12); }
.btn--small { padding: 9px 18px; font-size: .85rem; border-radius: 9px; }

/* ============ 导航栏 ============ */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(10, 14, 23, .78); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border); transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(10,14,23,.94); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: var(--gradient); color: #08101f;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-dot { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-link { font-size: .9rem; color: var(--text-muted); position: relative; padding: 6px 0; transition: color .25s; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--gradient); border-radius: 2px; transition: width .3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link--mobile-only { display: none; }
.menu-toggle { display: none; width: 38px; height: 38px; margin-left: auto; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero { padding: 96px 0 110px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px;
  background: rgba(129,140,248,.1); border: 1px solid rgba(129,140,248,.22);
  border-radius: 100px; font-size: .78rem; font-weight: 600; color: #c7d2fe; margin-bottom: 24px;
}
.badge-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero-title { font-size: clamp(2.5rem, 5.4vw, 4rem); line-height: 1.14; font-weight: 850; letter-spacing: -.035em; }
.hero-desc { margin-top: 24px; color: var(--text-muted); font-size: 1.05rem; max-width: 560px; }
.hero-desc strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 48px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: .82rem; color: var(--text-dim); margin-top: 2px; }

/* Hero 模拟窗口 */
.hero-visual { position: relative; }
.window-card {
  background: linear-gradient(160deg, #141d2f, #0e1523); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow), 0 0 70px rgba(99,102,241,.12);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.window-title { margin-left: 12px; font-size: .72rem; color: var(--text-dim); font-family: monospace; }
.window-body { padding: 18px; }
.mock-row { display: grid; grid-template-columns: 1fr 76px 74px; gap: 10px; align-items: center; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .78rem; }
.mock-row--head { color: var(--text-dim); font-size: .7rem; font-weight: 700; letter-spacing: .05em; }
.mock-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-ic { width: 18px; height: 18px; border-radius: 4px; flex: none; display: inline-block; }
.mock-ic--doc { background: rgba(129,140,248,.25); border: 1px solid rgba(129,140,248,.4); }
.mock-ic--img { background: rgba(34,211,238,.2); border: 1px solid rgba(34,211,238,.4); }
.mock-ic--code { background: rgba(167,139,250,.2); border: 1px solid rgba(167,139,250,.4); }
.mock-muted { color: var(--text-dim); font-size: .72rem; }
.tag { display: inline-block; text-align: center; padding: 3px 8px; border-radius: 100px; font-size: .68rem; font-weight: 600; }
.tag--green { background: rgba(52,211,153,.12); color: var(--green); }
.tag--blue { background: rgba(34,211,238,.12); color: var(--cyan); }
.tag--yellow { background: rgba(251,191,36,.12); color: var(--amber); }
.mock-chart { display: flex; align-items: flex-end; gap: 10px; height: 90px; padding: 16px 8px 4px; }
.mock-bar { flex: 1; height: var(--h); border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--primary), rgba(129,140,248,.15)); transition: height .8s var(--ease); }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: rgba(20,29,47,.92); border: 1px solid var(--border-hover); border-radius: 11px;
  font-size: .78rem; font-weight: 600; box-shadow: var(--shadow); backdrop-filter: blur(8px);
  animation: float 5s ease-in-out infinite;
}
.float-chip--1 { top: -22px; right: -18px; }
.float-chip--2 { bottom: -20px; left: -24px; animation-delay: -2.5s; }
.chip-icon { color: var(--green); font-size: 1rem; }
.float-chip--2 .chip-icon { color: var(--cyan); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============ 认识 CMS ============ */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.about-card { padding: 30px 28px; transition: transform .3s var(--ease), border-color .3s; }
.about-card:hover { transform: translateY(-6px); border-color: var(--border-hover); }
.about-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(129,140,248,.12); color: var(--primary); margin-bottom: 20px; }
.about-icon svg { width: 23px; height: 23px; }
.about-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.about-card p { color: var(--text-muted); font-size: .92rem; }
.about-card strong { color: var(--text); font-weight: 600; }
.flow { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.flow-step { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; font-size: .88rem; font-weight: 600; }
.flow-num { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--gradient); color: #08101f; font-size: .75rem; font-weight: 800; }
.flow-arrow { color: var(--primary); font-size: 1.2rem; }

/* ============ 核心能力 ============ */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  padding: 30px 28px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform .3s var(--ease), border-color .3s, background .3s;
  position: relative; overflow: hidden;
}
.feature-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px circle at top right, rgba(129,140,248,.07), transparent 60%); opacity: 0; transition: opacity .3s; }
.feature-card:hover { transform: translateY(-6px); border-color: var(--border-hover); background: var(--surface-2); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 20px; position: relative; }
.feature-icon svg { width: 24px; height: 24px; }
.feature-icon--indigo { background: rgba(129,140,248,.13); color: var(--primary); }
.feature-icon--cyan { background: rgba(34,211,238,.13); color: var(--cyan); }
.feature-icon--violet { background: rgba(167,139,250,.13); color: var(--violet); }
.feature-icon--green { background: rgba(52,211,153,.13); color: var(--green); }
.feature-icon--amber { background: rgba(251,191,36,.13); color: var(--amber); }
.feature-icon--rose { background: rgba(251,113,133,.13); color: var(--rose); }
.feature-card h3 { font-size: 1.12rem; margin-bottom: 9px; }
.feature-card p { color: var(--text-muted); font-size: .9rem; }

/* ============ 主流系统 ============ */
.system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.system-card {
  padding: 26px; background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.system-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow); }
.system-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.system-logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; font-size: 1.3rem; font-weight: 900; color: #fff; }
.system-logo--wp { background: #21759b; } .system-logo--drupal { background: #0c4b78; }
.system-logo--strapi { background: #5943c7; } .system-logo--contentful { background: #2478cc; }
.system-logo--joomla { background: #c44a36; } .system-logo--notion { background: #2f2f2f; border: 1px solid rgba(255,255,255,.2); }
.system-type { font-size: .72rem; color: var(--text-dim); background: rgba(255,255,255,.05); padding: 4px 10px; border-radius: 100px; }
.system-card h3 { font-size: 1.18rem; margin-bottom: 9px; }
.system-card p { color: var(--text-muted); font-size: .88rem; min-height: 76px; }
.system-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.system-tags span { font-size: .72rem; color: var(--primary); background: rgba(129,140,248,.09); border: 1px solid rgba(129,140,248,.18); padding: 3px 10px; border-radius: 6px; }

/* ============ 学习路线 ============ */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 42px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--primary), rgba(34,211,238,.3)); }
.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -37px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid var(--bg); box-shadow: 0 0 0 3px rgba(129,140,248,.2); }
.timeline-card { padding: 24px 28px; transition: transform .3s var(--ease), border-color .3s; }
.timeline-card:hover { transform: translateX(6px); border-color: var(--border-hover); }
.timeline-stage { font-size: .75rem; font-weight: 700; color: var(--cyan); letter-spacing: .05em; }
.timeline-card h3 { font-size: 1.15rem; margin: 6px 0 8px; }
.timeline-card p { color: var(--text-muted); font-size: .9rem; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.timeline-tags span { font-size: .72rem; color: var(--text-dim); border: 1px solid var(--border); padding: 3px 10px; border-radius: 6px; }

/* ============ 研究笔记 ============ */
.note-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.note-card {
  padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.note-card:hover { transform: translateY(-6px); border-color: var(--border-hover); background: var(--surface-2); }
.note-meta { display: flex; align-items: center; justify-content: space-between; font-size: .75rem; color: var(--text-dim); margin-bottom: 16px; }
.note-cat { color: var(--primary); font-weight: 700; background: rgba(129,140,248,.1); padding: 3px 10px; border-radius: 6px; }
.note-card h3 { font-size: 1.08rem; line-height: 1.5; margin-bottom: 12px; }
.note-card p { color: var(--text-muted); font-size: .88rem; flex: 1; }
.note-read { margin-top: 20px; color: var(--primary); font-size: .85rem; font-weight: 600; }
.note-card:hover .note-read span { display: inline-block; transform: translate(3px, -3px); transition: transform .25s; }

/* ============ 联系 ============ */
.contact { padding-bottom: 120px; }
.contact-box {
  position: relative; overflow: hidden; text-align: center; padding: 72px 32px;
  background: linear-gradient(160deg, rgba(129,140,248,.09), rgba(34,211,238,.04));
  border: 1px solid var(--border-hover); border-radius: 24px;
}
.contact-glow { position: absolute; width: 400px; height: 400px; background: rgba(99,102,241,.18); border-radius: 50%; filter: blur(90px); top: -200px; left: 50%; transform: translateX(-50%); }
.contact .section-sub { margin-inline: auto; max-width: 560px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; background: rgba(0,0,0,.15); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.footer-inner p { font-size: .82rem; color: var(--text-dim); }
.footer-copy { width: 100%; text-align: center; margin-top: 8px; }

/* ============ 返回顶部 ============ */
.back-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border-hover); color: var(--text); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s, background .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-strong); color: #fff; }
.back-to-top svg { width: 20px; height: 20px; }

/* ============ 滚动出现动画 ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.feature-card:nth-child(2), .about-card:nth-child(2), .system-card:nth-child(2), .note-card:nth-child(2) { transition-delay: .08s; }
.feature-card:nth-child(3), .about-card:nth-child(3), .system-card:nth-child(3), .note-card:nth-child(3) { transition-delay: .16s; }
.feature-card:nth-child(4), .system-card:nth-child(4) { transition-delay: .24s; }
.feature-card:nth-child(5), .system-card:nth-child(5) { transition-delay: .32s; }
.feature-card:nth-child(6), .system-card:nth-child(6) { transition-delay: .4s; }

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 560px; }
  .about-grid, .feature-grid, .system-grid, .note-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 18px; }
  .nav-cta { display: none; }
}
@media (max-width: 720px) {
  .section { padding: 78px 0; }
  .container { width: min(100% - 36px, var(--container)); }
  .menu-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 18px 18px;
    background: rgba(10,14,23,.98); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav-link::after { display: none; }
  .nav-link--mobile-only { display: block; color: var(--primary); }
  .hero { padding: 60px 0 80px; }
  .hero-title { font-size: clamp(2.1rem, 8vw, 3rem); }
  .hero-stats { gap: 26px; }
  .about-grid, .feature-grid, .system-grid, .note-grid { grid-template-columns: 1fr; }
  .section-head--row { flex-direction: column; align-items: flex-start; }
  .system-card p { min-height: auto; }
  .window-card { transform: none; }
  .float-chip--1 { right: -6px; } .float-chip--2 { left: -6px; }
  .footer-inner { justify-content: center; text-align: center; }
  .back-to-top { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
