/**
 * 伴学成长官网 — 基于 伴学系统3.html 毛玻璃视觉
 */
:root {
  --slate-900: #0f172a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --indigo-500: #6366f1;
  --purple-500: #8b5cf6;
  --emerald-500: #10b981;
  --cyan-400: #22d3ee;
  --wrap: 1280px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #070b14;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 科技感背景光晕层 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(59, 130, 246, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 90%, rgba(6, 182, 212, 0.14) 0%, transparent 55%),
    linear-gradient(160deg, #0a0f1a 0%, #0d1220 35%, #0a1628 65%, #0f0a1a 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 20%, transparent 75%);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* 粒子背景 */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

main,
.site-nav,
.site-footer {
  position: relative;
  z-index: 2;
}

/* 毛玻璃 — 深色科技风 */
.glass {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.glass-card {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 24px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -12px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(99, 102, 241, 0.35);
}

.text-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 导航 */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.site-nav.scrolled {
  padding: 10px 0;
}

.nav-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-glass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.22);
  transition: all 0.3s ease;
}

.site-nav.scrolled .nav-glass {
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-icon.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--blue-400); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--text-primary);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 12px 40px -8px rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-ghost:hover {
  color: var(--blue-400);
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(99, 102, 241, 0.08);
  text-decoration: none;
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
  text-align: center;
}

.hero-inner { width: 100%; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-lead {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 480px;
  margin: 0 auto;
}

/* 三端架构条 */
.arch-strip {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 24px;
  border-radius: 20px;
  text-align: left;
}

.arch-item {
  flex: 1;
  min-width: 180px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.arch-item.highlight {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
}

.arch-item strong {
  display: block;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.arch-item span:last-child {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.arch-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.arch-tag.primary {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7dd3fc;
  padding: 0 4px;
  opacity: 0.85;
}

.arch-arrow .icon-line {
  width: 22px;
  height: 22px;
}

/* 角色卡片链接 */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--blue-400);
  text-decoration: none;
  font-weight: 500;
}

.card-link:hover { color: #93c5fd; }
.card-link .icon-line { width: 16px; height: 16px; flex-shrink: 0; }

/* 如何开始 */
.start-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}

.mp-panel h3,
.flow-panel h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.mp-qr-box {
  text-align: center;
  margin-bottom: 20px;
}

.mp-qr-img {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.mp-qr-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px dashed rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-qr-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(52, 211, 153, 0.9));
  color: #041018;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-qr-icon .icon-line {
  width: 34px;
  height: 34px;
}

.mp-qr-tip {
  font-size: 14px;
  color: var(--text-secondary);
}

.mp-app-id {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.mp-app-id code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #c7d2fe;
}

.mp-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  text-align: left;
}

.mp-links-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.mp-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin: 8px 0;
  color: var(--text-secondary);
}

.mp-link-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mp-link-label .icon-line {
  color: #38bdf8;
  opacity: 0.95;
}

.mp-link-row a {
  color: #93c5fd;
  text-decoration: none;
  word-break: break-all;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-link-row a:hover {
  text-decoration: underline;
}

.mp-link-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 12px;
  width: fit-content;
}

.role-tab {
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.role-tab.active {
  background: rgba(99, 102, 241, 0.25);
  color: var(--text-primary);
  font-weight: 500;
}

.role-flow {
  display: none;
}

.role-flow.active {
  display: block;
}

.footer-staff {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  opacity: 0.75;
}

.footer-staff:hover {
  opacity: 1;
  color: var(--blue-400) !important;
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 64px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-head p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Cards */
.glass-card {
  padding: 32px;
}

.glass-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.glass-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.icon-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.icon-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.icon-emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.icon-gradient-blue {
  background: linear-gradient(135deg, #60a5fa, #6366f1);
  color: #fff;
}

.icon-gradient-purple {
  background: linear-gradient(135deg, #c084fc, #ec4899);
  color: #fff;
}

.icon-blue-sm,
.icon-purple-sm,
.icon-emerald-sm,
.icon-rose-sm {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.icon-blue-sm { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.icon-purple-sm { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.icon-emerald-sm { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.icon-rose-sm { background: rgba(244, 63, 94, 0.2); color: #fb7185; }

.check-list {
  list-style: none;
  margin-top: 20px;
}

.check-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--emerald-500);
  font-weight: 600;
}

.check-list.iconized li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-left: 0;
}

.check-list.iconized li::before {
  content: none;
}

.check-list.iconized .icon-line.check {
  width: 18px;
  height: 18px;
  color: #34d399;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-list.compact { margin-top: 16px; }

/* Certify */
.certify-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.certify-head .icon-box { margin-bottom: 0; }

.certify-head .sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.certify-desc {
  margin-bottom: 8px;
}

/* Growth tiles */
.growth-tile {
  text-align: center;
  padding: 24px 16px;
  cursor: default;
}

.growth-tile h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.growth-tile p {
  font-size: 12px;
  color: var(--text-muted);
}

.growth-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.gi-blue { background: linear-gradient(135deg, #60a5fa, #22d3ee); }
.gi-purple { background: linear-gradient(135deg, #c084fc, #f472b6); }
.gi-amber { background: linear-gradient(135deg, #fbbf24, #fb923c); }
.gi-emerald { background: linear-gradient(135deg, #34d399, #14b8a6); }

/* Flow */
.flow-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--blue-400);
}

.flow-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.flow-steps {
  list-style: none;
}

.flow-steps li:last-child { border-bottom: none; }

.flow-steps.iconized > li:not(.flow-connector) {
  border-bottom: none;
  padding: 10px 0;
}

.flow-steps.iconized .flow-connector {
  justify-content: flex-start;
  padding: 0 0 0 10px;
  border-bottom: none;
  color: rgba(56, 189, 248, 0.55);
  min-height: 18px;
}

.flow-steps.iconized .flow-ico {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #7dd3fc;
}

.flow-steps.iconized .flow-ico .icon-line {
  width: 18px;
  height: 18px;
}

.flow-steps.iconized .flow-text {
  flex: 1;
  line-height: 1.55;
  padding-top: 4px;
}

.flow-steps.iconized .inline-arrow {
  display: inline-block;
  vertical-align: -3px;
  margin: 0 4px;
  color: #38bdf8;
}

/* CTA */
.cta-card {
  text-align: center;
  padding: 64px 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.flow-steps span:not(.flow-ico):not(.flow-text) {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Heroicons / Lucide-style line icons */
.icon-line {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-line.lg { width: 34px; height: 34px; }
.icon-line.sm { width: 16px; height: 16px; }
.icon-line.xs { width: 14px; height: 14px; }

/* Safety */
.safety-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.safety-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

.cta-card h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.cta-card > p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.cta-tip {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 48px 0;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--blue-400); }

.footer-copy {
  font-size: 14px;
  color: var(--text-muted);
}

/* 响应式 */
@media (max-width: 1024px) {
  .grid-3,
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .start-grid { grid-template-columns: 1fr; }
  .arch-strip { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); justify-content: center; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 24px;
    right: 24px;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }

  .nav-links.open { display: flex; }

  .nav-wrap { position: relative; }

  .nav-toggle { display: block; }

  .nav-actions .btn-ghost { display: none; }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .hero-stats { gap: 20px; }

  .stat-num { font-size: 26px; }

  .cta-card { padding: 40px 24px; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .glass-card:hover { transform: none; }
  .btn-primary:hover,
  .btn-secondary:hover { transform: none; }
  .pulse-dot { animation: none; }
}
