/* ═══════════════════════════════════════
   小北校园 · iOS Grouped Layout
   统一卡片 · 统一尺寸 · 板块分明
   ═══════════════════════════════════════ */

:root {
  --blue: #007AFF;
  --blue-dark: #0051D5;
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --text: #1C1C1E;
  --text2: #636366;
  --text3: #8E8E93;
  --sep: rgba(60, 60, 67, 0.12);
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --icon: 44px;
  --icon-sm: 36px;
  --icon-lg: 56px;
  --icon-xl: 72px;
  --topbar: 52px;
  --gap: 20px;
  --wrap: 960px;
  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── 统一图片尺寸 ── */
.img-icon { object-fit: contain; flex-shrink: 0; }
.img-icon-xs { width: 24px; height: 24px; }
.img-icon-sm { width: var(--icon-sm); height: var(--icon-sm); border-radius: 9px; }
.img-icon-lg { width: var(--icon-lg); height: var(--icon-lg); border-radius: 14px; }
.img-icon-xl { width: var(--icon-xl); height: var(--icon-xl); border-radius: 18px; }
.img-round { border-radius: 50%; object-fit: cover; }

[data-lucide] { width: 22px; height: 22px; stroke-width: 2; flex-shrink: 0; }

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

/* ── 顶栏 iOS 毛玻璃 ── */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--topbar);
  background: rgba(242, 242, 247, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.topnav { display: flex; align-items: center; gap: 2px; }
.topnav-link {
  padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--text2);
  border-radius: 980px; transition: 0.2s;
}
.topnav-link:hover, .topnav-link.active { color: var(--text); background: rgba(0,0,0,0.05); }
.topnav-cta { background: var(--blue) !important; color: #fff !important; margin-left: 4px; }
.topnav-cta:hover { background: var(--blue-dark) !important; }
.menu-btn { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.menu-btn span { width: 20px; height: 2px; background: var(--text); border-radius: 1px; transition: 0.2s; }
.menu-btn.on span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-btn.on span:nth-child(2) { opacity: 0; }
.menu-btn.on span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── 页面 & 板块 ── */
.page { padding-top: calc(var(--topbar) + 16px); }
.block { padding: 32px 0; }
.block-hero { padding-top: 12px; }
.block-last { padding-bottom: 48px; }

.block-head { text-align: center; margin-bottom: 16px; }
.block-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.block-head p { font-size: 14px; color: var(--text3); }

/* ── 统一卡片容器（iOS Grouped） ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card + .card { margin-top: var(--gap); }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 980px;
  font-size: 15px; font-weight: 600; transition: 0.2s;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-blue.loading { opacity: 0.6; pointer-events: none; }
.btn-gray { background: rgba(0,0,0,0.06); color: var(--text); }
.btn-gray:hover { background: rgba(0,0,0,0.1); }
.card-hero .btn-gray { color: #fff; background: rgba(255,255,255,0.12); }
.card-hero .btn-gray:hover { background: rgba(255,255,255,0.2); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

/* ── Hero 卡片 ── */
.card-hero {
  background: linear-gradient(145deg, #0F172A 0%, #1E3A5F 100%);
  color: #fff;
  padding: 32px;
}
.hero-grid { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; margin-bottom: 16px;
  font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,0.1); border-radius: 980px;
}
.hero-text h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 12px; }
.hero-lead { font-size: 15px; color: rgba(255,255,255,0.7); min-height: 24px; margin-bottom: 20px; }
.cursor { animation: blink 1s step-end infinite; color: #60A5FA; }
@keyframes blink { 50% { opacity: 0; } }

.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cell-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.08); border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); transition: 0.2s;
}
.cell-btn:hover { background: rgba(255,255,255,0.14); }
.cell-btn [data-lucide] { width: 20px; height: 20px; color: #60A5FA; }

/* 手机预览 — 固定尺寸 */
.hero-phone { display: flex; justify-content: center; }
.phone-shell {
  width: 240px; padding: 12px;
  background: rgba(255,255,255,0.1); border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 32px;
}
.phone-screen {
  height: 300px; padding: 18px 16px;
  background: rgba(0,0,0,0.2); border-radius: 22px; overflow: hidden;
}
.phone-slide { display: none; }
.phone-slide.active { display: block; }
.phone-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #60A5FA; margin-bottom: 4px; }
.phone-label [data-lucide] { width: 14px; height: 14px; }
.phone-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.phone-map { position: relative; height: 140px; background: rgba(255,255,255,0.06); border-radius: var(--radius-xs); }
.phone-map .route { position: absolute; top: 45%; left: 15%; width: 70%; height: 2px; background: linear-gradient(90deg, #007AFF, #60A5FA); transform: rotate(-4deg); }
.phone-map .pin { position: absolute; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.pin-a { left: 15%; top: 42%; background: #34C759; }
.pin-b { right: 15%; top: 50%; background: #FF3B30; }
.phone-list li { padding: 10px 12px; margin-bottom: 6px; font-size: 13px; background: rgba(255,255,255,0.08); border-radius: var(--radius-xs); }
.phone-list li.done { opacity: 0.4; }
.phone-list li.on { background: rgba(0,122,255,0.2); border: 0.5px solid rgba(0,122,255,0.4); }
.phone-gpa { width: 80px; height: 80px; margin: 20px auto; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; border: 4px solid rgba(0,122,255,0.5); border-radius: 50%; }
.phone-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.phone-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); padding: 0; }
.phone-dots .dot.on { background: #fff; width: 18px; border-radius: 3px; }

/* ── 网格系统 ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--sep); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--sep); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--sep); }
.grid-compact { gap: 1px; }

/* ── 功能 Tile（等大） ── */
.tile {
  padding: 24px 16px; text-align: center; background: var(--card);
  transition: background 0.2s;
}
.tile:hover { background: #FAFAFA; }
.tile-icon {
  width: var(--icon); height: var(--icon); margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,122,255,0.1); border-radius: var(--radius-sm); color: var(--blue);
}
.tile-icon [data-lucide] { width: 22px; height: 22px; }
.tile h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.tile p { font-size: 12px; color: var(--text3); }

/* ── 数据统计 ── */
.card-dark { background: #1C1C1E; color: #fff; }
.card-dark .grid-4 { background: rgba(255,255,255,0.08); }
.stat { padding: 28px 12px; text-align: center; background: #1C1C1E; }
.stat strong, .stat .count {
  display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 4px;
}
.card-dark .stat { background: #1C1C1E; }
.stat span { font-size: 13px; color: rgba(255,255,255,0.5); }
.stat-light strong, .stat-light .count { font-size: 22px; color: var(--blue); }
.stat-light span { color: var(--text3); }
.stat-light { padding: 16px 8px; background: var(--card); }

/* ── 服务按钮网格（等大） ── */
.svc {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 20px 8px; min-height: 96px;
  background: var(--card); transition: background 0.2s;
}
.svc:hover { background: #FAFAFA; }
.svc [data-lucide] { width: 24px; height: 24px; color: var(--blue); }
.svc span { font-size: 13px; font-weight: 500; }

/* ── 小程序搜索 & 数据 ── */
.mp-search {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-bottom: 0.5px solid var(--sep);
}
.mp-search-text { flex: 1; min-width: 0; }
.mp-search-label { display: block; font-size: 12px; font-weight: 600; color: var(--text3); margin-bottom: 4px; }
.mp-search-name {
  display: block;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  word-break: break-all;
}
.mp-search-text p { font-size: 13px; color: var(--text3); line-height: 1.5; }
.mp-data-grid { background: var(--sep); }
.mp-data {
  padding: 22px 12px;
  text-align: center;
  background: var(--card);
}
.mp-data strong, .mp-data .count {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
}
.mp-data span { font-size: 12px; color: var(--text3); }

.block-head p strong { color: var(--blue); font-weight: 600; }

/* ── 校园风光（保留类名兼容，已改用 mp-*） ── */
.seg-bar {
  display: flex; padding: 4px; margin: 12px 12px 0;
  background: rgba(0,0,0,0.06); border-radius: var(--radius-xs);
}
.seg {
  flex: 1; padding: 8px 4px; font-size: 13px; font-weight: 600; color: var(--text2);
  border-radius: 8px; transition: 0.2s;
}
.seg.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.news-banner {
  display: flex; align-items: center; gap: 16px;
  margin: 12px; padding: 16px;
  background: rgba(0,122,255,0.06); border-radius: var(--radius-sm);
}
.news-badge { display: inline-block; font-size: 11px; font-weight: 600; color: var(--blue); margin-bottom: 4px; }
.news-banner h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.news-banner p { font-size: 13px; color: var(--text3); }

.list { display: none; border-top: 0.5px solid var(--sep); }
.list.active { display: block; }
.list li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 0.5px solid var(--sep);
}
.list li:last-child { border-bottom: none; }
.list time { flex-shrink: 0; width: 44px; font-size: 13px; color: var(--text3); font-variant-numeric: tabular-nums; }
.list a { font-size: 14px; font-weight: 500; transition: color 0.2s; }
.list a:hover { color: var(--blue); }

/* ── 团队 ── */
.team-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; }
.team-info { padding: 24px; border-right: 0.5px solid var(--sep); }
.team-desc { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 20px; }
.team-nums { margin-bottom: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  padding: 5px 12px; font-size: 12px; font-weight: 500; color: var(--blue);
  background: rgba(0,122,255,0.08); border-radius: 980px;
}
.team-side { padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.team-side .img-icon-xl { margin-bottom: 12px; }
.team-side h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.team-points { width: 100%; text-align: left; margin-bottom: 16px; }
.team-points li {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0; font-size: 13px; color: var(--text2);
  border-top: 0.5px solid var(--sep);
}
.team-points [data-lucide] { width: 16px; height: 16px; color: var(--blue); }

/* ── FAQ iOS 列表 ── */
.faq { border-bottom: 0.5px solid var(--sep); }
.faq:last-child { border-bottom: none; }
.faq summary {
  padding: 16px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--blue); }
.faq[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { padding: 0 18px 16px; font-size: 14px; color: var(--text2); line-height: 1.65; }

/* ── CTA ── */
.card-cta { padding: 32px; background: linear-gradient(145deg, #0F172A, #1E3A5F); color: #fff; }
.cta-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.card-cta h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.card-cta p { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 20px; }
.qr-box { text-align: center; }
.qr-img { width: 140px; height: 140px; object-fit: contain; border-radius: var(--radius-sm); background: #fff; padding: 8px; }
.qr-box span { display: block; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.5); }

/* ── 页脚 ── */
.foot { padding: 32px 0; background: var(--card); border-top: 0.5px solid var(--sep); font-size: 13px; color: var(--text3); }
.foot-inner { display: grid; grid-template-columns: 1.2fr auto 1fr; gap: 24px; align-items: start; }
.foot-brand { display: flex; gap: 10px; align-items: center; }
.foot-brand strong { display: block; color: var(--text); font-size: 15px; }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot-links a:hover { color: var(--blue); }
.foot-meta { text-align: right; line-height: 1.8; }
.foot-meta a { color: var(--text3); }
.foot-meta a:hover { color: var(--text); }

/* ── 弹窗 ── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: 0.25s; padding: 24px;
}
.modal.show { opacity: 1; visibility: visible; }
.modal-box {
  position: relative; width: 100%; max-width: 300px; padding: 28px;
  text-align: center; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2); transform: scale(0.95); transition: 0.25s;
}
.modal.show .modal-box { transform: none; }
.modal-x { position: absolute; top: 10px; right: 14px; font-size: 22px; color: var(--text3); }
.modal-box h3 { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.modal-box .qr-img { margin: 0 auto 12px; }
.modal-box p { font-size: 13px; color: var(--text3); }

/* 内容默认可见，避免未滚动时出现大块空白 */
.reveal { opacity: 1; transform: none; }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .hero-phone { order: -1; margin-bottom: 8px; }
  .btn-row { justify-content: center; width: 100%; }
  .quick-row { width: 100%; max-width: 360px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .team-info { border-right: none; border-bottom: 0.5px solid var(--sep); }
  .cta-grid { grid-template-columns: 1fr; text-align: center; }
  .mp-search { flex-direction: column; text-align: center; }
  .mp-search .btn { width: 100%; max-width: 280px; }
  .foot-inner { grid-template-columns: 1fr; text-align: center; }
  .foot-brand { justify-content: center; }
  .foot-links { align-items: center; }
  .foot-meta { text-align: center; }
}

@media (max-width: 600px) {
  .topnav {
    position: fixed; top: var(--topbar); left: 16px; right: 16px;
    flex-direction: column; padding: 8px;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
    transform: translateY(-120%); opacity: 0; pointer-events: none; transition: 0.25s;
  }
  .topnav.open { transform: none; opacity: 1; pointer-events: auto; }
  .topnav-link { width: 100%; text-align: center; padding: 12px; }
  .menu-btn { display: flex; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .card-hero { padding: 24px 20px; }
  .quick-row { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
