/* ===================================================================
   课集 ClassSet 官网 · 样式
   设计令牌取自 design/DESIGN.md（温暖极简 / Notion Warm Workspace 风）
   =================================================================== */

:root {
  /* 色彩令牌 */
  --canvas: #F6F5F4;
  --surface: #FFFFFF;
  --accent: #0075DE;
  --accent-strong: #0066CC;
  --accent-soft: #E8F1FC;
  --text-primary: #1A1A1A;
  --text-secondary: #615D59;
  --text-muted: #A39E98;
  --border: rgba(0, 0, 0, 0.08);
  --success: #2BA471;
  --warning: #C98A2B;
  --danger: #D54941;

  /* 间距（4px 基准） */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* 形状 */
  --r-card: 16px;
  --r-ctrl: 10px;
  --r-pill: 999px;

  /* 阴影（轻薄、仅浮层/卡片） */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.10);

  --maxw: 1120px;
  --nav-h: 64px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff;
  padding: var(--sp-2) var(--sp-4); border-radius: 0 0 var(--r-ctrl) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 0 var(--sp-5); height: 40px;
  border-radius: var(--r-ctrl);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--lg { height: 48px; padding: 0 var(--sp-8); font-size: 15px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-strong); box-shadow: var(--shadow-md); }

.btn--ghost { background: var(--surface); color: var(--text-primary); border-color: var(--border); }
.btn--ghost:hover { background: #fff; border-color: var(--accent); color: var(--accent); }

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(246, 245, 244, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); }

.brand { display: inline-flex; align-items: center; gap: var(--sp-3); }
.brand__mark { border-radius: 9px; box-shadow: var(--shadow-sm); flex: none; }
.brand__name { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.brand__en { color: var(--text-muted); font-weight: 600; font-size: 13px; }

.nav__links { display: flex; align-items: center; gap: var(--sp-6); }
.nav__links a { font-size: 14px; color: var(--text-secondary); transition: color .15s ease; }
.nav__links a:hover { color: var(--accent); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-3); }

.nav__toggle {
  display: none; width: 40px; height: 40px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-ctrl); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav__toggle span { width: 18px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: .2s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__mobile { display: none; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4) var(--sp-6) var(--sp-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.nav__mobile a { padding: var(--sp-3) var(--sp-2); color: var(--text-secondary); border-radius: var(--r-ctrl); }
.nav__mobile a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 12px; border-radius: var(--r-pill); margin-bottom: var(--sp-5);
}

.hero__title { font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; }
.hero__sub { margin-top: var(--sp-5); font-size: clamp(15px, 1.6vw, 17px); color: var(--text-secondary); max-width: 46ch; }
.hero__sub strong { color: var(--text-primary); font-weight: 600; }

.hero__cta { margin-top: var(--sp-8); display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.hero__trust { margin-top: var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.hero__trust li {
  position: relative; padding-left: 18px; font-size: 13px; color: var(--text-muted);
}
.hero__trust li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ---------- 课表视觉（App 框） ---------- */
.hero__visual { display: flex; justify-content: center; }
.appframe {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.appframe__bar {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: #FBFAF9; border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--r { background: #ED6A5E; } .dot--y { background: #F4BF4F; } .dot--g { background: #61C554; }
.appframe__title { margin-left: var(--sp-2); font-size: 12px; color: var(--text-muted); font-weight: 500; }
.appframe__body { padding: var(--sp-4); }

.schedule { width: 100%; border-collapse: separate; border-spacing: 4px; }
.schedule th {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  padding: 4px 2px; text-align: center;
}
.schedule tbody th {
  background: var(--accent-soft); color: var(--accent);
  border-radius: 8px; font-weight: 600; width: 30px;
}
.cell {
  text-align: center; font-size: 11px; line-height: 1.25;
  border-radius: 8px; padding: 6px 2px; min-height: 34px;
  color: var(--text-primary); font-weight: 500;
}
.cell small { display: block; font-size: 9px; color: inherit; opacity: .82; font-weight: 400; }
.cell--empty { background: transparent; }
.cell--free { background: #F1F0EF; color: var(--text-muted); font-style: normal; }

/* ---------- 通用区块 ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--soft { background: #FBFAF9; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 680px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section__title { font-size: clamp(24px, 3.2vw, 34px); margin-top: var(--sp-3); }
.section__lead { margin-top: var(--sp-4); color: var(--text-secondary); font-size: 16px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: var(--sp-5); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(0,117,222,0.25); }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: var(--sp-4);
}
.card__icon svg { width: 22px; height: 22px; }
.card__title { font-size: 17px; margin-bottom: var(--sp-2); }
.card__text { font-size: 14px; color: var(--text-secondary); }

/* ---------- 对比 ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); max-width: 920px; margin: 0 auto; }
.compare__col { border-radius: var(--r-card); padding: var(--sp-6); border: 1px solid var(--border); }
.compare__col--us { background: var(--surface); box-shadow: var(--shadow-md); }
.compare__col--them { background: #FBFAF9; }
.compare__head { font-size: 16px; margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.compare__list li { display: flex; gap: var(--sp-3); font-size: 14px; color: var(--text-secondary); padding: var(--sp-2) 0; }
.tick { color: var(--success); flex: none; }
.cross { color: var(--text-muted); flex: none; }
.tick svg, .cross svg { width: 16px; height: 16px; }

/* ---------- 工作流步骤 ---------- */
.steps { display: flex; flex-wrap: wrap; gap: var(--sp-5); counter-reset: step; }
.step {
  flex: 1 1 180px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: var(--sp-6);
  box-shadow: var(--shadow-sm); position: relative;
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  margin-bottom: var(--sp-4);
}
.step__title { font-size: 16px; margin-bottom: var(--sp-2); }
.step__text { font-size: 14px; color: var(--text-secondary); }

/* ---------- 下载 ---------- */
.download__grid { max-width: 880px; margin: 0 auto; }
.platform { text-align: center; }
.platform__icon { color: var(--accent); margin-bottom: var(--sp-3); display: flex; }
.platform__icon svg { width: 40px; height: 40px; }
.platform__name { font-size: 18px; }
.platform__meta { font-size: 13px; color: var(--text-muted); margin: var(--sp-2) 0 var(--sp-4); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: var(--r-pill); }
.badge--soon { background: #FFF4E5; color: var(--warning); }

.download__cta { max-width: 560px; margin: clamp(32px, 5vw, 56px) auto 0; text-align: center; }
.download__cta > p { color: var(--text-secondary); margin-bottom: var(--sp-4); }
.notify { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }
.notify__input {
  flex: 1 1 260px; max-width: 320px;
  height: 44px; padding: 0 var(--sp-4);
  border: 1px solid var(--border); border-radius: var(--r-ctrl);
  font-family: inherit; font-size: 14px; background: var(--surface); color: var(--text-primary);
}
.notify__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.notify__hint { min-height: 20px; margin-top: var(--sp-3); font-size: 13px; color: var(--success); }

/* ---------- 页脚 ---------- */
.footer { background: #1F1D1B; color: #E9E6E2; padding: var(--sp-10) 0 var(--sp-6); }
.footer__inner { display: flex; justify-content: space-between; gap: var(--sp-8); flex-wrap: wrap; align-items: flex-start; }
.footer .brand__name { color: #fff; }
.footer .brand__en { color: #9A958E; }
.footer__tag { margin-top: var(--sp-4); color: #A39E98; font-size: 14px; max-width: 30ch; }
.footer__links { display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.footer__links a { color: #C9C4BE; font-size: 14px; }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  margin-top: var(--sp-8); padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  font-size: 13px; color: #8C8780;
}
.footer__note { color: #8C8780; }

/* ---------- 滚动揭示动效 ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .compare { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__links, .nav__actions .btn--primary { display: none; }
  .nav__toggle { display: flex; }
  .nav__mobile.is-open { display: flex; }
  .grid--3 { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; gap: var(--sp-6); }
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
